@Only-api
@Post
@Get
@Delete
@Location
Feature: Location resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Location node. This resource is part of the Chemotherapy,Major Surgery,Radiotherapy.
File name: xal.feature
Relative path: api/xal.feature
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:46.490 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:47.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:47.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YQNwbcvWSsMdGZe8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20378/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:47.116 [print] {
"resourceType": "Location",
"id": "20378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:50.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:47.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:47.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:47.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YQNwbcvWSsMdGZe8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20378/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:47.118 [print] {
"resourceType": "Location",
"id": "20378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:50.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:47.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:47.715 [print] {
"resourceType": "Location",
"id": "20378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:50.253+02:00",
"source": "#YQNwbcvWSsMdGZe8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:48.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:48.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:05:51.498+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:05:51.498+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:48.945 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:49.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:49.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJPq7mmqnQfyV66h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20379/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:49.548 [print] {
"resourceType": "Location",
"id": "20379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:52.696+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:49.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:49.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:49.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJPq7mmqnQfyV66h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20379/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:49.550 [print] {
"resourceType": "Location",
"id": "20379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:52.696+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:49.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:50.165 [print] {
"resourceType": "Location",
"id": "20379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:52.696+02:00",
"source": "#AJPq7mmqnQfyV66h",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:50.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:51.410 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:05:53.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:05:53.964+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:51.412 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:52.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"317"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:52.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgmLRqgT6C3sKz59"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20380/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:52.049 [print] {
"resourceType": "Location",
"id": "20380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:55.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:52.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:52.052 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"317"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:52.052 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgmLRqgT6C3sKz59"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20380/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:52.052 [print] {
"resourceType": "Location",
"id": "20380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:55.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:52.052 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:52.649 [print] {
"resourceType": "Location",
"id": "20380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:55.197+02:00",
"source": "#kgmLRqgT6C3sKz59",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:53.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:53.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:05:56.418+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:05:56.418+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:53.897 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:54.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"317"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:54.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JNgJjGE6vvSx0kAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20381/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:54.540 [print] {
"resourceType": "Location",
"id": "20381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:57.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:54.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:54.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"317"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:54.542 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JNgJjGE6vvSx0kAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20381/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:05:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:54.542 [print] {
"resourceType": "Location",
"id": "20381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:57.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:54.542 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:55.165 [print] {
"resourceType": "Location",
"id": "20381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:05:57.682+02:00",
"source": "#JNgJjGE6vvSx0kAr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LLUIS ALCANYIS DE XATIVA",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:55.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:56.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:05:58.936+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:05:58.936+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:56.403 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:57.032 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:57.032 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"04jMz1Pw1l83eNPW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20382/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:57.033 [print] {
"resourceType": "Location",
"id": "20382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:00.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:57.033 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:57.035 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:57.035 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"04jMz1Pw1l83eNPW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20382/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:05:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:57.035 [print] {
"resourceType": "Location",
"id": "20382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:00.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:05:57.035 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:57.725 [print] {
"resourceType": "Location",
"id": "20382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:00.172+02:00",
"source": "#04jMz1Pw1l83eNPW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:58.386 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:58.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:01.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:01.536+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:05:58.999 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:59.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"332"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:59.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"chirQDyjJoMX13Zt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20383/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:59.620 [print] {
"resourceType": "Location",
"id": "20383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:02.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:05:59.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:59.622 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"332"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:59.622 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"chirQDyjJoMX13Zt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20383/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:59.622 [print] {
"resourceType": "Location",
"id": "20383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:02.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:05:59.622 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:00.224 [print] {
"resourceType": "Location",
"id": "20383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:02.768+02:00",
"source": "#chirQDyjJoMX13Zt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:00.854 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:01.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:03.997+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:03.997+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:01.472 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:02.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:02.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Lly5UiqoxPQlmtC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20384/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:02.107 [print] {
"resourceType": "Location",
"id": "20384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:05.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:02.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:02.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:02.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Lly5UiqoxPQlmtC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20384/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:02.108 [print] {
"resourceType": "Location",
"id": "20384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:05.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:02.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:02.707 [print] {
"resourceType": "Location",
"id": "20384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:05.249+02:00",
"source": "#2Lly5UiqoxPQlmtC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:03.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:04.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:06.519+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:06.519+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:04.040 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:04.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:04.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z99pdGX0AQT9b4WG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20385/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:04.723 [print] {
"resourceType": "Location",
"id": "20385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:07.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:04.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:04.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:04.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z99pdGX0AQT9b4WG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20385/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:04.725 [print] {
"resourceType": "Location",
"id": "20385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:07.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:04.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:05.359 [print] {
"resourceType": "Location",
"id": "20385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:07.845+02:00",
"source": "#z99pdGX0AQT9b4WG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:05.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:06.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:09.103+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:09.103+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:06.546 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:07.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:07.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0TbNmdAADlXrlcbi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20386/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:07.182 [print] {
"resourceType": "Location",
"id": "20386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:10.324+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:07.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:07.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:07.183 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0TbNmdAADlXrlcbi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20386/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:07.183 [print] {
"resourceType": "Location",
"id": "20386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:10.324+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:07.183 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:07.791 [print] {
"resourceType": "Location",
"id": "20386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:10.324+02:00",
"source": "#0TbNmdAADlXrlcbi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:08.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:09.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:11.614+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:11.614+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:09.084 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:09.826 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:09.826 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f3zBsz8MbIW0BOKM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20387/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:09.826 [print] {
"resourceType": "Location",
"id": "20387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:12.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:09.826 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:09.828 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:09.828 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f3zBsz8MbIW0BOKM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20387/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:09.828 [print] {
"resourceType": "Location",
"id": "20387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:12.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:09.828 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:10.432 [print] {
"resourceType": "Location",
"id": "20387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:12.971+02:00",
"source": "#f3zBsz8MbIW0BOKM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:11.051 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:11.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:14.197+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:14.197+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:11.679 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:12.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:12.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BK72RfLmNg3nrrcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20388/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:12.313 [print] {
"resourceType": "Location",
"id": "20388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:15.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:12.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:12.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:12.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BK72RfLmNg3nrrcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20388/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:12.315 [print] {
"resourceType": "Location",
"id": "20388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:15.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:12.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:12.914 [print] {
"resourceType": "Location",
"id": "20388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:15.449+02:00",
"source": "#BK72RfLmNg3nrrcq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:13.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:14.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:16.673+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:16.673+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:14.227 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:14.835 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:14.835 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u0xDnpL7RKpjc1s3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20389/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:14.835 [print] {
"resourceType": "Location",
"id": "20389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:17.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:14.835 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:14.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:14.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u0xDnpL7RKpjc1s3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20389/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:14.838 [print] {
"resourceType": "Location",
"id": "20389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:17.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:14.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:15.443 [print] {
"resourceType": "Location",
"id": "20389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:17.984+02:00",
"source": "#u0xDnpL7RKpjc1s3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:16.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:16.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:19.213+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:19.213+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:16.724 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:17.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:17.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7zntRfQvMHdARRkr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20390/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:17.343 [print] {
"resourceType": "Location",
"id": "20390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:20.492+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:17.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:17.345 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:17.345 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7zntRfQvMHdARRkr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20390/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:17.345 [print] {
"resourceType": "Location",
"id": "20390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:20.492+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:17.345 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:17.939 [print] {
"resourceType": "Location",
"id": "20390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:20.492+02:00",
"source": "#7zntRfQvMHdARRkr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:18.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:19.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:21.699+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:21.699+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:19.182 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:19.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:19.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTLi6x4SMQQ3VrnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20391/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:19.775 [print] {
"resourceType": "Location",
"id": "20391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:22.926+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:19.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:19.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:19.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTLi6x4SMQQ3VrnO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20391/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:19.777 [print] {
"resourceType": "Location",
"id": "20391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:22.926+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:19.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:20.376 [print] {
"resourceType": "Location",
"id": "20391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:22.926+02:00",
"source": "#yTLi6x4SMQQ3VrnO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:21.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:21.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:24.167+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:24.167+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:21.643 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:22.258 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:22.258 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9xwj2m80YdCBhIs5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20392/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:22.258 [print] {
"resourceType": "Location",
"id": "20392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:25.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:22.258 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:22.259 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:22.259 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9xwj2m80YdCBhIs5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20392/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:22.259 [print] {
"resourceType": "Location",
"id": "20392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:25.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:22.259 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:22.849 [print] {
"resourceType": "Location",
"id": "20392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:25.404+02:00",
"source": "#9xwj2m80YdCBhIs5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:23.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:24.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:26.602+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:26.602+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:24.143 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:24.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:24.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKwX7NnhIfV4VFS4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20393/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:24.779 [print] {
"resourceType": "Location",
"id": "20393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:27.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:24.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:24.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:24.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKwX7NnhIfV4VFS4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20393/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:24.780 [print] {
"resourceType": "Location",
"id": "20393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:27.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:24.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:25.396 [print] {
"resourceType": "Location",
"id": "20393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:27.914+02:00",
"source": "#QKwX7NnhIfV4VFS4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:26.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:26.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:29.158+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:29.158+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:26.638 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:27.268 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:27.268 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jfMpiuKOgoJQX45W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20394/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:27.268 [print] {
"resourceType": "Location",
"id": "20394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:30.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:27.268 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:27.270 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:27.270 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jfMpiuKOgoJQX45W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20394/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:27.270 [print] {
"resourceType": "Location",
"id": "20394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:30.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:27.270 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:27.876 [print] {
"resourceType": "Location",
"id": "20394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:30.403+02:00",
"source": "#jfMpiuKOgoJQX45W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:28.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:29.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:31.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:31.628+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:29.113 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:29.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:29.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p7kaUTV4ID6G0lqH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20395/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:29.954 [print] {
"resourceType": "Location",
"id": "20395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:33.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:29.954 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:29.955 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:29.955 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p7kaUTV4ID6G0lqH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20395/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:29.955 [print] {
"resourceType": "Location",
"id": "20395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:33.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:29.955 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:30.561 [print] {
"resourceType": "Location",
"id": "20395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:33.096+02:00",
"source": "#p7kaUTV4ID6G0lqH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:31.185 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:31.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:34.337+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:34.337+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:31.798 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:32.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:32.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YREVwVZTX34rcpd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20396/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:32.410 [print] {
"resourceType": "Location",
"id": "20396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:35.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:32.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:32.412 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:32.412 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YREVwVZTX34rcpd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20396/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:32.412 [print] {
"resourceType": "Location",
"id": "20396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:35.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:32.412 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:33.037 [print] {
"resourceType": "Location",
"id": "20396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:35.553+02:00",
"source": "#YREVwVZTX34rcpd8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:33.633 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:34.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:36.780+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:36.780+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:34.247 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:34.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"307"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:34.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MmLmplv2L0JadK21"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20397/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:34.845 [print] {
"resourceType": "Location",
"id": "20397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:37.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:06:34.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:34.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"307"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:34.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MmLmplv2L0JadK21"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20397/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:34.847 [print] {
"resourceType": "Location",
"id": "20397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:37.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:06:34.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:35.499 [print] {
"resourceType": "Location",
"id": "20397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:37.995+02:00",
"source": "#MmLmplv2L0JadK21",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:36.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:36.712 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:39.262+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:39.262+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:36.713 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:37.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:37.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nNdFKlUPsEEp6kAq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20398/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:37.352 [print] {
"resourceType": "Location",
"id": "20398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:40.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:37.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:37.354 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:37.354 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nNdFKlUPsEEp6kAq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20398/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:37.354 [print] {
"resourceType": "Location",
"id": "20398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:40.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:37.354 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:37.958 [print] {
"resourceType": "Location",
"id": "20398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:40.496+02:00",
"source": "#nNdFKlUPsEEp6kAq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:38.605 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:39.333 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:41.753+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:41.753+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:39.334 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:39.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:39.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NprHVRhvcLKj8PVK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20399/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:39.948 [print] {
"resourceType": "Location",
"id": "20399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:43.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:39.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:39.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:39.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NprHVRhvcLKj8PVK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20399/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:39.950 [print] {
"resourceType": "Location",
"id": "20399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:43.096+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:39.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:40.556 [print] {
"resourceType": "Location",
"id": "20399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:43.096+02:00",
"source": "#NprHVRhvcLKj8PVK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:41.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:41.770 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:44.306+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:44.306+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:41.771 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:42.389 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:42.389 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZDNIFWtnmJ6NGlEK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20400/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:42.389 [print] {
"resourceType": "Location",
"id": "20400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:45.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:42.389 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:42.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:42.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZDNIFWtnmJ6NGlEK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20400/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:42.390 [print] {
"resourceType": "Location",
"id": "20400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:45.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:42.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:43.283 [print] {
"resourceType": "Location",
"id": "20400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:45.534+02:00",
"source": "#ZDNIFWtnmJ6NGlEK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:43.927 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:44.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:47.072+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:47.072+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:44.528 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:45.455 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:45.455 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGZWMCVGoKbc3KlK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20401/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:45.455 [print] {
"resourceType": "Location",
"id": "20401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:48.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:45.455 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:45.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:45.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGZWMCVGoKbc3KlK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20401/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:45.457 [print] {
"resourceType": "Location",
"id": "20401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:48.589+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:45.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:46.061 [print] {
"resourceType": "Location",
"id": "20401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:48.589+02:00",
"source": "#rGZWMCVGoKbc3KlK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:46.662 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:47.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:49.813+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:49.813+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:47.539 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:48.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:48.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WSVBBp07hjwuOnDR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20402/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:48.175 [print] {
"resourceType": "Location",
"id": "20402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:51.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:48.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:48.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:48.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WSVBBp07hjwuOnDR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20402/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:48.176 [print] {
"resourceType": "Location",
"id": "20402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:51.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:48.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:48.795 [print] {
"resourceType": "Location",
"id": "20402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:51.304+02:00",
"source": "#WSVBBp07hjwuOnDR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:49.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:50.024 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:52.571+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:52.571+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:50.026 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:50.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:50.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CORl3d7vp6PXYWLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20403/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:50.633 [print] {
"resourceType": "Location",
"id": "20403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:53.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:50.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:50.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:50.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CORl3d7vp6PXYWLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20403/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:50.634 [print] {
"resourceType": "Location",
"id": "20403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:53.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:50.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:51.239 [print] {
"resourceType": "Location",
"id": "20403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:53.783+02:00",
"source": "#CORl3d7vp6PXYWLU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:51.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:52.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:54.996+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:54.996+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:52.449 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:53.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:53.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OoDUbNTSYJvLCtad"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20404/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:53.071 [print] {
"resourceType": "Location",
"id": "20404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:56.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:53.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:53.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:53.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OoDUbNTSYJvLCtad"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20404/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:53.072 [print] {
"resourceType": "Location",
"id": "20404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:56.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:53.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:53.681 [print] {
"resourceType": "Location",
"id": "20404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:56.200+02:00",
"source": "#OoDUbNTSYJvLCtad",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:54.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:54.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:57.452+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:57.452+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:54.912 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:55.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:55.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FbFF9fY0t4BFCho6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20405/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:55.552 [print] {
"resourceType": "Location",
"id": "20405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:58.695+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:55.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:55.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:55.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FbFF9fY0t4BFCho6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20405/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:06:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:06:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:55.554 [print] {
"resourceType": "Location",
"id": "20405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:58.695+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:55.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:56.171 [print] {
"resourceType": "Location",
"id": "20405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:06:58.695+02:00",
"source": "#FbFF9fY0t4BFCho6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:56.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:57.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:06:59.937+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:06:59.937+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:57.395 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:58.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:58.029 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z73qD3vC3LlDwfN0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20406/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:58.029 [print] {
"resourceType": "Location",
"id": "20406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:01.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:58.029 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:58.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:58.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z73qD3vC3LlDwfN0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20406/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:58.030 [print] {
"resourceType": "Location",
"id": "20406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:01.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:06:58.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:58.642 [print] {
"resourceType": "Location",
"id": "20406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:01.173+02:00",
"source": "#Z73qD3vC3LlDwfN0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:59.253 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:59.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:02.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:02.401+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:06:59.863 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:00.481 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"339"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:00.481 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z7xlNcDVUYXI4KrQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20407/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:00.481 [print] {
"resourceType": "Location",
"id": "20407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:03.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
> *
print COOKIES
11:07:00.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:00.483 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"339"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:00.483 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z7xlNcDVUYXI4KrQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20407/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:00.483 [print] {
"resourceType": "Location",
"id": "20407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:03.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
> *
print COOKIES
11:07:00.483 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:02.123 [print] {
"resourceType": "Location",
"id": "20407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:03.624+02:00",
"source": "#z7xlNcDVUYXI4KrQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:02.722 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:03.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:05.875+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:05.875+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:03.332 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:03.975 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:03.975 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NBvlTPNNThSwgRwd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20408/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20408/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:03.975 [print] {
"resourceType": "Location",
"id": "20408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:07.115+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:07:03.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:03.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:03.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NBvlTPNNThSwgRwd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20408/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20408/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:03.977 [print] {
"resourceType": "Location",
"id": "20408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:07.115+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:07:03.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:04.616 [print] {
"resourceType": "Location",
"id": "20408",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:07.115+02:00",
"source": "#NBvlTPNNThSwgRwd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:05.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:05.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:08.375+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:08.375+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:05.949 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:06.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:06.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZKI70meBnZqdV9zN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20409/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20409/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:06.569 [print] {
"resourceType": "Location",
"id": "20409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:09.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:06.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:06.571 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:06.571 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZKI70meBnZqdV9zN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20409/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20409/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:06.571 [print] {
"resourceType": "Location",
"id": "20409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:09.710+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:06.571 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:07.186 [print] {
"resourceType": "Location",
"id": "20409",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:09.710+02:00",
"source": "#ZKI70meBnZqdV9zN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:07.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:08.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:10.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:10.972+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:08.434 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:09.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:09.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NtwSls7tQmSL9XAi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20410/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20410/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:09.068 [print] {
"resourceType": "Location",
"id": "20410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:12.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:09.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:09.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:09.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NtwSls7tQmSL9XAi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20410/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20410/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:09.070 [print] {
"resourceType": "Location",
"id": "20410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:12.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:09.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:09.720 [print] {
"resourceType": "Location",
"id": "20410",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:12.200+02:00",
"source": "#NtwSls7tQmSL9XAi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:10.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:10.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:13.490+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:13.490+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:10.989 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:11.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:11.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hskSqyHlzrW1XiNJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20411/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20411/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:11.643 [print] {
"resourceType": "Location",
"id": "20411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:14.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:11.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:11.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:11.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hskSqyHlzrW1XiNJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20411/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20411/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:11.645 [print] {
"resourceType": "Location",
"id": "20411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:14.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:11.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:12.450 [print] {
"resourceType": "Location",
"id": "20411",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:14.791+02:00",
"source": "#hskSqyHlzrW1XiNJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:13.090 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:13.692 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:16.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:16.231+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:13.694 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:14.292 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"325"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:14.292 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ljsUh1pBJz62FgaT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20412/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20412/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:14.292 [print] {
"resourceType": "Location",
"id": "20412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:17.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:07:14.292 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:14.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"325"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:14.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ljsUh1pBJz62FgaT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20412/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20412/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:14.294 [print] {
"resourceType": "Location",
"id": "20412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:17.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:07:14.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:14.907 [print] {
"resourceType": "Location",
"id": "20412",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:17.437+02:00",
"source": "#ljsUh1pBJz62FgaT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:15.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:16.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:18.724+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:18.724+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:16.192 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:16.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:16.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bm2f0sWQEYhono4D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20413/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20413/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:16.799 [print] {
"resourceType": "Location",
"id": "20413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:19.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:16.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:16.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:16.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bm2f0sWQEYhono4D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20413/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20413/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:16.800 [print] {
"resourceType": "Location",
"id": "20413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:19.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:16.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:17.406 [print] {
"resourceType": "Location",
"id": "20413",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:19.948+02:00",
"source": "#Bm2f0sWQEYhono4D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:18.016 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:18.634 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:21.165+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:21.165+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:18.636 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:19.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:19.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3FPjOAqQwBQXWyl1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20414/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20414/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:19.276 [print] {
"resourceType": "Location",
"id": "20414",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:22.421+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:19.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:19.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:19.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3FPjOAqQwBQXWyl1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20414/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20414/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:19.278 [print] {
"resourceType": "Location",
"id": "20414",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:22.421+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:19.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:19.892 [print] {
"resourceType": "Location",
"id": "20414",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:22.421+02:00",
"source": "#3FPjOAqQwBQXWyl1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:20.503 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:21.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:23.650+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:23.650+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:21.108 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:21.726 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:21.726 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1QikoRPHlpkSmoh8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20415/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20415/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:21.726 [print] {
"resourceType": "Location",
"id": "20415",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:24.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:21.726 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:21.728 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:21.728 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1QikoRPHlpkSmoh8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20415/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20415/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:21.728 [print] {
"resourceType": "Location",
"id": "20415",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:24.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:21.728 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:23.355 [print] {
"resourceType": "Location",
"id": "20415",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:24.868+02:00",
"source": "#1QikoRPHlpkSmoh8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:24.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:24.799 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:27.313+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:27.313+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:24.801 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:25.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:25.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xkIF7T3yI4X1PiQN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20416/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20416/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:25.418 [print] {
"resourceType": "Location",
"id": "20416",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:28.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:25.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:25.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:25.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xkIF7T3yI4X1PiQN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20416/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20416/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:25.420 [print] {
"resourceType": "Location",
"id": "20416",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:28.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:25.420 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:26.016 [print] {
"resourceType": "Location",
"id": "20416",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:28.564+02:00",
"source": "#xkIF7T3yI4X1PiQN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:26.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:27.215 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:29.772+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:29.772+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:27.217 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:27.818 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:27.818 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fWJpH3Z8spmERbBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20417/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20417/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:27.818 [print] {
"resourceType": "Location",
"id": "20417",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:30.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:27.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:27.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:27.820 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fWJpH3Z8spmERbBS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20417/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20417/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:27.820 [print] {
"resourceType": "Location",
"id": "20417",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:30.967+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:27.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:28.417 [print] {
"resourceType": "Location",
"id": "20417",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:30.967+02:00",
"source": "#fWJpH3Z8spmERbBS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:29.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:29.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:32.188+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:32.188+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:29.657 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:30.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"320"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:30.253 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7npE27HwiG64D2bd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20418/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20418/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:30.253 [print] {
"resourceType": "Location",
"id": "20418",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:33.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:07:30.253 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:30.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"320"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:30.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7npE27HwiG64D2bd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20418/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20418/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:30.255 [print] {
"resourceType": "Location",
"id": "20418",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:33.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:07:30.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:30.862 [print] {
"resourceType": "Location",
"id": "20418",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:33.403+02:00",
"source": "#7npE27HwiG64D2bd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:33.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:34.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:36.823+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:36.823+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:34.288 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:34.929 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:34.929 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5d40o34K3qTp86w3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20419/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20419/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:34.929 [print] {
"resourceType": "Location",
"id": "20419",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:38.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:34.929 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:34.931 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:34.931 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5d40o34K3qTp86w3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20419/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20419/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:34.931 [print] {
"resourceType": "Location",
"id": "20419",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:38.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:34.931 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:35.743 [print] {
"resourceType": "Location",
"id": "20419",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:38.052+02:00",
"source": "#5d40o34K3qTp86w3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:36.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:36.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:39.500+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:39.500+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:36.999 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:37.598 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:37.598 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uztDjqGMAaW99DEo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20420/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20420/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:37.598 [print] {
"resourceType": "Location",
"id": "20420",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:40.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:37.598 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:37.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:37.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uztDjqGMAaW99DEo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20420/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20420/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:37.600 [print] {
"resourceType": "Location",
"id": "20420",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:40.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:37.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:38.236 [print] {
"resourceType": "Location",
"id": "20420",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:40.750+02:00",
"source": "#uztDjqGMAaW99DEo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:38.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:39.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:42.001+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:42.001+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:39.527 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:40.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:40.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zWyEzj2ew6WUHHdZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20421/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20421/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:40.173 [print] {
"resourceType": "Location",
"id": "20421",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:43.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:40.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:40.174 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:40.174 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zWyEzj2ew6WUHHdZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20421/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20421/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:40.174 [print] {
"resourceType": "Location",
"id": "20421",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:43.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:40.174 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:40.778 [print] {
"resourceType": "Location",
"id": "20421",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:43.322+02:00",
"source": "#zWyEzj2ew6WUHHdZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:41.740 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:42.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:44.893+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:44.893+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:42.360 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:42.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:42.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7DLUhpAnNQa0EYct"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20422/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20422/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:42.991 [print] {
"resourceType": "Location",
"id": "20422",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:46.119+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:42.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:42.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:42.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7DLUhpAnNQa0EYct"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20422/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20422/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:42.992 [print] {
"resourceType": "Location",
"id": "20422",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:46.119+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:42.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:43.576 [print] {
"resourceType": "Location",
"id": "20422",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:46.119+02:00",
"source": "#7DLUhpAnNQa0EYct",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:44.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:44.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:47.337+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:47.337+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:44.796 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:45.409 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:45.409 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4msLE4YiEalCdnr5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20423/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20423/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:45.409 [print] {
"resourceType": "Location",
"id": "20423",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:48.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:45.409 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:45.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:45.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4msLE4YiEalCdnr5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20423/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20423/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:45.411 [print] {
"resourceType": "Location",
"id": "20423",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:48.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:45.411 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:46.021 [print] {
"resourceType": "Location",
"id": "20423",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:48.559+02:00",
"source": "#4msLE4YiEalCdnr5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:46.632 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:47.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:49.782+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:49.782+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:47.235 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:47.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:47.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9NjYCPpcguBVscLf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20424/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20424/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:47.863 [print] {
"resourceType": "Location",
"id": "20424",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:51.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:47.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:47.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:47.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9NjYCPpcguBVscLf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20424/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20424/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:47.865 [print] {
"resourceType": "Location",
"id": "20424",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:51.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:47.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:48.469 [print] {
"resourceType": "Location",
"id": "20424",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:51.004+02:00",
"source": "#9NjYCPpcguBVscLf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:49.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:49.690 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:52.229+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:52.229+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:49.692 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:50.322 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:50.322 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W5a3mhB3fgn6WvUo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20425/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20425/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:50.322 [print] {
"resourceType": "Location",
"id": "20425",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:53.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:50.322 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:50.323 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:50.323 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W5a3mhB3fgn6WvUo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20425/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20425/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:50.323 [print] {
"resourceType": "Location",
"id": "20425",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:53.467+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:50.324 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:50.948 [print] {
"resourceType": "Location",
"id": "20425",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:53.467+02:00",
"source": "#W5a3mhB3fgn6WvUo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:52.574 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:53.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:55.726+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:55.726+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:53.204 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:53.830 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:53.830 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"soIYhonWHBanKBSt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20426/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20426/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:53.830 [print] {
"resourceType": "Location",
"id": "20426",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:56.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:53.830 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:53.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:53.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"soIYhonWHBanKBSt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20426/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:07:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20426/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:07:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:53.831 [print] {
"resourceType": "Location",
"id": "20426",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:56.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:53.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:54.446 [print] {
"resourceType": "Location",
"id": "20426",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:07:56.970+02:00",
"source": "#soIYhonWHBanKBSt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:55.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:55.696 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:07:58.240+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:07:58.240+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:55.697 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:57.321 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:57.321 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hr3r9zWcM2dDwQk9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20427/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20427/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:57.321 [print] {
"resourceType": "Location",
"id": "20427",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:00.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:57.321 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:57.323 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:57.323 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hr3r9zWcM2dDwQk9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20427/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20427/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:57.323 [print] {
"resourceType": "Location",
"id": "20427",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:00.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:07:57.323 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:58.200 [print] {
"resourceType": "Location",
"id": "20427",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:00.461+02:00",
"source": "#hr3r9zWcM2dDwQk9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:58.792 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:59.408 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:01.943+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:01.943+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:07:59.410 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:00.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:00.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sXFRjYV1aeQAZB3c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20428/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20428/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:00.016 [print] {
"resourceType": "Location",
"id": "20428",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:03.166+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:00.016 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:00.017 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:00.017 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sXFRjYV1aeQAZB3c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20428/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20428/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:00.017 [print] {
"resourceType": "Location",
"id": "20428",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:03.166+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:00.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:00.617 [print] {
"resourceType": "Location",
"id": "20428",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:03.166+02:00",
"source": "#sXFRjYV1aeQAZB3c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:01.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:01.835 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:04.381+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:04.381+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:01.838 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:02.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"311"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:02.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l2hIhTuVc6gBrID0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20429/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20429/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:02.472 [print] {
"resourceType": "Location",
"id": "20429",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:05.621+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
> *
print COOKIES
11:08:02.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:02.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"311"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:02.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l2hIhTuVc6gBrID0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20429/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20429/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:02.473 [print] {
"resourceType": "Location",
"id": "20429",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:05.621+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
> *
print COOKIES
11:08:02.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:03.079 [print] {
"resourceType": "Location",
"id": "20429",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:05.621+02:00",
"source": "#l2hIhTuVc6gBrID0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:04.756 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:05.385 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:07.899+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:07.899+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:05.387 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:06.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:06.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ESG8GTPNjYJMQm0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20430/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20430/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:06.013 [print] {
"resourceType": "Location",
"id": "20430",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:09.154+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:06.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:06.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:06.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ESG8GTPNjYJMQm0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20430/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20430/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:06.014 [print] {
"resourceType": "Location",
"id": "20430",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:09.154+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:06.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:06.600 [print] {
"resourceType": "Location",
"id": "20430",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:09.154+02:00",
"source": "#ESG8GTPNjYJMQm0R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:07.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:07.946 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:10.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:10.475+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:07.948 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:08.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:08.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PpKLIfM0nfndY7Za"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20431/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20431/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:08.559 [print] {
"resourceType": "Location",
"id": "20431",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:11.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:08.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:08.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:08.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PpKLIfM0nfndY7Za"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20431/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20431/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:08.561 [print] {
"resourceType": "Location",
"id": "20431",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:11.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:08.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:09.164 [print] {
"resourceType": "Location",
"id": "20431",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:11.697+02:00",
"source": "#PpKLIfM0nfndY7Za",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:09.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:10.445 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:12.930+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:12.930+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:10.446 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:11.052 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"313"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:11.052 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"INplWfJIJM8v5J7B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20432/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20432/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:11.052 [print] {
"resourceType": "Location",
"id": "20432",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:14.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:11.052 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:11.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"313"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:11.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"INplWfJIJM8v5J7B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20432/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20432/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:11.054 [print] {
"resourceType": "Location",
"id": "20432",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:14.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:11.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:11.671 [print] {
"resourceType": "Location",
"id": "20432",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:14.200+02:00",
"source": "#INplWfJIJM8v5J7B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:12.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:12.916 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:15.461+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:15.461+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:12.917 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:13.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:13.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jsUkTTW41swpnGSq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20433/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20433/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:13.553 [print] {
"resourceType": "Location",
"id": "20433",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:16.687+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:13.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:13.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:13.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jsUkTTW41swpnGSq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20433/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20433/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:13.555 [print] {
"resourceType": "Location",
"id": "20433",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:16.687+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:13.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:14.152 [print] {
"resourceType": "Location",
"id": "20433",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:16.687+02:00",
"source": "#jsUkTTW41swpnGSq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:14.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:15.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:17.925+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:17.925+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:15.381 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:15.998 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"320"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:15.998 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o5KQbXRWMN2I4Eji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20434/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20434/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:15.998 [print] {
"resourceType": "Location",
"id": "20434",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:19.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:15.998 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:16.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"320"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:16.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o5KQbXRWMN2I4Eji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20434/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20434/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:16.000 [print] {
"resourceType": "Location",
"id": "20434",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:19.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:16.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:16.593 [print] {
"resourceType": "Location",
"id": "20434",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:19.148+02:00",
"source": "#o5KQbXRWMN2I4Eji",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO DE LA PLANA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:17.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:17.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:20.414+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:20.414+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:17.868 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:18.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:18.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iqNERrQlxBulphJ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20435/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20435/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:18.492 [print] {
"resourceType": "Location",
"id": "20435",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:21.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:18.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:18.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:18.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iqNERrQlxBulphJ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20435/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20435/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:18.494 [print] {
"resourceType": "Location",
"id": "20435",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:21.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:18.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:20.086 [print] {
"resourceType": "Location",
"id": "20435",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:21.629+02:00",
"source": "#iqNERrQlxBulphJ7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:20.713 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:21.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:23.857+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:23.857+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:21.325 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:21.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:21.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ExvLWZ2F8L4VRqSl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20436/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20436/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:21.922 [print] {
"resourceType": "Location",
"id": "20436",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:25.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:21.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:21.924 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:21.924 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ExvLWZ2F8L4VRqSl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20436/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20436/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:21.924 [print] {
"resourceType": "Location",
"id": "20436",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:25.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:21.924 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:22.533 [print] {
"resourceType": "Location",
"id": "20436",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:25.072+02:00",
"source": "#ExvLWZ2F8L4VRqSl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:23.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:23.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:26.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:26.358+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:23.824 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:24.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:24.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mAsbxXWq1Mw96lT1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20437/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20437/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:24.467 [print] {
"resourceType": "Location",
"id": "20437",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:27.606+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:24.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:24.468 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:24.468 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mAsbxXWq1Mw96lT1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20437/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20437/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:24.468 [print] {
"resourceType": "Location",
"id": "20437",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:27.606+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:24.468 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:26.074 [print] {
"resourceType": "Location",
"id": "20437",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:27.606+02:00",
"source": "#mAsbxXWq1Mw96lT1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:26.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:27.287 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:29.841+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:29.841+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:27.288 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:27.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:27.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y0EOkiSYK7f55Kis"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20438/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20438/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:27.914 [print] {
"resourceType": "Location",
"id": "20438",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:31.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:27.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:27.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:27.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y0EOkiSYK7f55Kis"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20438/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20438/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:27.915 [print] {
"resourceType": "Location",
"id": "20438",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:31.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:27.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:28.524 [print] {
"resourceType": "Location",
"id": "20438",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:31.047+02:00",
"source": "#Y0EOkiSYK7f55Kis",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:29.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:29.755 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:32.300+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:32.300+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:29.757 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:30.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:30.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bLBR8Z48sTsloJWZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20439/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20439/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:30.365 [print] {
"resourceType": "Location",
"id": "20439",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:33.512+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:30.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:30.367 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:30.367 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bLBR8Z48sTsloJWZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20439/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20439/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:30.367 [print] {
"resourceType": "Location",
"id": "20439",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:33.512+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:30.367 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:31.000 [print] {
"resourceType": "Location",
"id": "20439",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:33.512+02:00",
"source": "#bLBR8Z48sTsloJWZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:31.609 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:33.220 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:34.755+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:34.755+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:33.222 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:33.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:33.846 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OExATzvXA5YRJCeb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20440/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20440/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:33.846 [print] {
"resourceType": "Location",
"id": "20440",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:36.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:33.846 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:33.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:33.848 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OExATzvXA5YRJCeb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20440/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20440/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:33.848 [print] {
"resourceType": "Location",
"id": "20440",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:36.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:33.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:34.471 [print] {
"resourceType": "Location",
"id": "20440",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:36.996+02:00",
"source": "#OExATzvXA5YRJCeb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:35.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:35.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:38.232+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:38.232+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:35.964 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:36.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:36.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9cpfkWVZWI8QpxgP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20441/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20441/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:36.769 [print] {
"resourceType": "Location",
"id": "20441",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:39.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:36.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:36.771 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:36.771 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9cpfkWVZWI8QpxgP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20441/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20441/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:36.771 [print] {
"resourceType": "Location",
"id": "20441",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:39.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:36.771 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:37.392 [print] {
"resourceType": "Location",
"id": "20441",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:39.914+02:00",
"source": "#9cpfkWVZWI8QpxgP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "VITHAS HOSPITAL PERPETUO INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:37.998 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:38.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:41.150+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:41.150+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:38.616 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:39.221 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:39.221 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WXyfiIrKHfUpo2rK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20442/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20442/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:39.221 [print] {
"resourceType": "Location",
"id": "20442",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:42.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:39.221 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:39.222 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:39.222 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WXyfiIrKHfUpo2rK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20442/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20442/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:39.222 [print] {
"resourceType": "Location",
"id": "20442",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:42.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:39.222 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:39.816 [print] {
"resourceType": "Location",
"id": "20442",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:42.371+02:00",
"source": "#WXyfiIrKHfUpo2rK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:40.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:41.051 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:43.587+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:43.587+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:41.051 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:41.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"329"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:41.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gaXHntS5sTUOmvpc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20443/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20443/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:41.654 [print] {
"resourceType": "Location",
"id": "20443",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:44.800+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:41.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:41.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"329"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:41.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gaXHntS5sTUOmvpc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20443/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20443/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:41.656 [print] {
"resourceType": "Location",
"id": "20443",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:44.800+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:41.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:42.261 [print] {
"resourceType": "Location",
"id": "20443",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:44.800+02:00",
"source": "#gaXHntS5sTUOmvpc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:42.858 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:43.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:46.010+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:46.010+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:43.481 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:44.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:44.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CkvUMVeUDICHZngD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20444/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20444/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:44.099 [print] {
"resourceType": "Location",
"id": "20444",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:47.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:44.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:44.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:44.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CkvUMVeUDICHZngD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20444/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20444/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:44.100 [print] {
"resourceType": "Location",
"id": "20444",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:47.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:44.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:44.750 [print] {
"resourceType": "Location",
"id": "20444",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:47.241+02:00",
"source": "#CkvUMVeUDICHZngD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:45.346 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:46.147 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:48.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:48.496+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:46.148 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:46.805 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"313"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:46.805 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K386ITh34b3I4oms"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20445/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20445/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:46.805 [print] {
"resourceType": "Location",
"id": "20445",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:49.928+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:46.805 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:46.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"313"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:46.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K386ITh34b3I4oms"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20445/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20445/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:46.807 [print] {
"resourceType": "Location",
"id": "20445",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:49.928+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:46.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:47.437 [print] {
"resourceType": "Location",
"id": "20445",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:49.928+02:00",
"source": "#K386ITh34b3I4oms",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL VIRGEN DE LOS LIRIOS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:48.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:48.678 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:51.229+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:51.229+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:48.680 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:49.304 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:49.304 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lzuIrF4xuWwqXvlD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20446/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20446/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:49.304 [print] {
"resourceType": "Location",
"id": "20446",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:52.454+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:49.304 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:49.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:49.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lzuIrF4xuWwqXvlD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20446/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20446/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:49.306 [print] {
"resourceType": "Location",
"id": "20446",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:52.454+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:49.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:49.925 [print] {
"resourceType": "Location",
"id": "20446",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:52.454+02:00",
"source": "#lzuIrF4xuWwqXvlD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:50.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:51.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:53.671+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:53.671+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:51.135 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:51.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"332"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:51.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gSnbiOWOKiM99jJc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20447/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20447/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:51.760 [print] {
"resourceType": "Location",
"id": "20447",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:54.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:51.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:51.761 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"332"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:51.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gSnbiOWOKiM99jJc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20447/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20447/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:51.762 [print] {
"resourceType": "Location",
"id": "20447",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:54.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:08:51.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:52.365 [print] {
"resourceType": "Location",
"id": "20447",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:54.907+02:00",
"source": "#gSnbiOWOKiM99jJc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CONSORCIO HOSPITALARIO PROVINCIAL DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:53.013 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:53.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:56.137+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:56.137+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:53.615 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:54.259 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"333"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:54.259 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MSX3yioXpTIICSRq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20448/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20448/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:54.259 [print] {
"resourceType": "Location",
"id": "20448",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:57.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:54.259 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:54.260 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"333"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:54.260 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MSX3yioXpTIICSRq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20448/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20448/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:54.260 [print] {
"resourceType": "Location",
"id": "20448",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:57.400+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:08:54.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:54.866 [print] {
"resourceType": "Location",
"id": "20448",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:57.400+02:00",
"source": "#MSX3yioXpTIICSRq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:55.543 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:56.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:08:58.660+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:08:58.660+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:56.153 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:56.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:56.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cSDm0svV8irwcU2T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20449/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20449/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:56.788 [print] {
"resourceType": "Location",
"id": "20449",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:59.935+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:56.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:56.790 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:56.790 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cSDm0svV8irwcU2T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20449/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:08:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20449/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:08:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:56.790 [print] {
"resourceType": "Location",
"id": "20449",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:59.935+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:56.790 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:57.412 [print] {
"resourceType": "Location",
"id": "20449",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:08:59.935+02:00",
"source": "#cSDm0svV8irwcU2T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:08:58.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:08:58.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:01.191+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:01.191+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:08:58.683 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:59.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:59.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vOCHDd1B8587srmn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20450/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20450/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:59.307 [print] {
"resourceType": "Location",
"id": "20450",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:02.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:59.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:08:59.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:08:59.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vOCHDd1B8587srmn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20450/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20450/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:08:59.309 [print] {
"resourceType": "Location",
"id": "20450",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:02.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:08:59.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:08:59.911 [print] {
"resourceType": "Location",
"id": "20450",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:02.456+02:00",
"source": "#vOCHDd1B8587srmn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:00.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:01.156 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:03.683+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:03.683+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:01.158 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:01.772 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"305"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:01.772 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qPRaQFZEOScEAAR5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20451/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20451/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:01.772 [print] {
"resourceType": "Location",
"id": "20451",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:04.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:09:01.772 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:01.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"305"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:01.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qPRaQFZEOScEAAR5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20451/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20451/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:01.773 [print] {
"resourceType": "Location",
"id": "20451",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:04.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:09:01.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:02.379 [print] {
"resourceType": "Location",
"id": "20451",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:04.923+02:00",
"source": "#qPRaQFZEOScEAAR5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:03.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:03.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:06.150+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:06.150+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:03.629 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:04.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:04.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TZ1zbzuV9udE4x8e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20452/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20452/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:04.273 [print] {
"resourceType": "Location",
"id": "20452",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:07.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:04.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:04.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:04.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TZ1zbzuV9udE4x8e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20452/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20452/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:04.275 [print] {
"resourceType": "Location",
"id": "20452",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:07.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:04.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:04.887 [print] {
"resourceType": "Location",
"id": "20452",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:07.423+02:00",
"source": "#TZ1zbzuV9udE4x8e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:05.517 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:06.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:08.667+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:08.667+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:06.126 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:06.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:06.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6Y871cHntcRomFMq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20453/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20453/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:06.737 [print] {
"resourceType": "Location",
"id": "20453",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:06.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:06.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:06.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6Y871cHntcRomFMq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20453/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20453/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:06.739 [print] {
"resourceType": "Location",
"id": "20453",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:06.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:07.356 [print] {
"resourceType": "Location",
"id": "20453",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:09.888+02:00",
"source": "#6Y871cHntcRomFMq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:07.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:08.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:11.141+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:11.141+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:08.610 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:09.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:09.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ynrz2T24l4uDTuKP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20454/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20454/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:09.236 [print] {
"resourceType": "Location",
"id": "20454",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:12.386+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:09.236 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:09.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:09.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ynrz2T24l4uDTuKP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20454/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20454/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:09.237 [print] {
"resourceType": "Location",
"id": "20454",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:12.386+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:09.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:09.874 [print] {
"resourceType": "Location",
"id": "20454",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:12.386+02:00",
"source": "#Ynrz2T24l4uDTuKP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:10.527 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:11.546 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:13.659+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:13.659+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:11.547 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:12.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:12.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k0BN19x1eYvIW4ns"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20455/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20455/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:12.215 [print] {
"resourceType": "Location",
"id": "20455",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:15.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:12.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:12.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:12.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k0BN19x1eYvIW4ns"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20455/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20455/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:12.217 [print] {
"resourceType": "Location",
"id": "20455",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:15.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:12.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:12.834 [print] {
"resourceType": "Location",
"id": "20455",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:15.349+02:00",
"source": "#k0BN19x1eYvIW4ns",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:13.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:14.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:16.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:16.609+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:14.084 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:14.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:14.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AWZCN8NFB82zSWWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20456/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20456/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:14.692 [print] {
"resourceType": "Location",
"id": "20456",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:17.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:14.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:14.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:14.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AWZCN8NFB82zSWWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20456/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20456/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:14.694 [print] {
"resourceType": "Location",
"id": "20456",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:17.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:14.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:15.304 [print] {
"resourceType": "Location",
"id": "20456",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:17.840+02:00",
"source": "#AWZCN8NFB82zSWWc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:15.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:17.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:19.089+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:19.089+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:17.620 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:18.248 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:18.248 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"geu74sb2i6Ah53AL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20457/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20457/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:18.248 [print] {
"resourceType": "Location",
"id": "20457",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:21.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:18.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:18.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:18.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"geu74sb2i6Ah53AL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20457/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20457/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:18.249 [print] {
"resourceType": "Location",
"id": "20457",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:21.397+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:18.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:18.857 [print] {
"resourceType": "Location",
"id": "20457",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:21.397+02:00",
"source": "#geu74sb2i6Ah53AL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:19.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:20.147 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:22.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:22.665+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:20.150 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:20.820 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:20.820 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lQZKDOIN7WajfQ6R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20458/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20458/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:20.820 [print] {
"resourceType": "Location",
"id": "20458",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:23.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:20.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:20.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:20.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lQZKDOIN7WajfQ6R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20458/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20458/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:20.823 [print] {
"resourceType": "Location",
"id": "20458",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:23.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:20.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:21.448 [print] {
"resourceType": "Location",
"id": "20458",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:23.956+02:00",
"source": "#lQZKDOIN7WajfQ6R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:22.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:22.705 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:25.219+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:25.219+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:22.707 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:23.733 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:23.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xIooh40BJQiZ6AQT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20459/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20459/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:23.733 [print] {
"resourceType": "Location",
"id": "20459",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:26.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:23.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:23.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:23.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xIooh40BJQiZ6AQT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20459/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20459/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:23.734 [print] {
"resourceType": "Location",
"id": "20459",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:26.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:23.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:24.716 [print] {
"resourceType": "Location",
"id": "20459",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:26.854+02:00",
"source": "#xIooh40BJQiZ6AQT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:25.345 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:26.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:28.489+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:28.489+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:26.022 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:26.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:26.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wJ6jneGUFUB0tMf6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20460/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20460/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:26.870 [print] {
"resourceType": "Location",
"id": "20460",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:30.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:26.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:26.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:26.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wJ6jneGUFUB0tMf6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20460/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20460/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:26.872 [print] {
"resourceType": "Location",
"id": "20460",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:30.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:26.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:27.495 [print] {
"resourceType": "Location",
"id": "20460",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:30.000+02:00",
"source": "#wJ6jneGUFUB0tMf6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:28.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:29.416 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:31.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:31.621+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:29.418 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:31.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:31.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Lqg4zHkdN3LdtWkA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20461/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20461/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:31.037 [print] {
"resourceType": "Location",
"id": "20461",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:34.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:31.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:31.039 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:31.039 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Lqg4zHkdN3LdtWkA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20461/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20461/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:31.039 [print] {
"resourceType": "Location",
"id": "20461",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:34.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:31.039 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:31.657 [print] {
"resourceType": "Location",
"id": "20461",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:34.186+02:00",
"source": "#Lqg4zHkdN3LdtWkA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:32.276 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:32.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:35.426+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:35.426+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:32.898 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:33.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:33.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZfDnuiXDQkY8iIkt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20462/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20462/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:33.539 [print] {
"resourceType": "Location",
"id": "20462",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:36.666+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:33.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:33.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:33.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZfDnuiXDQkY8iIkt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20462/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20462/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:33.540 [print] {
"resourceType": "Location",
"id": "20462",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:36.666+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:33.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:34.177 [print] {
"resourceType": "Location",
"id": "20462",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:36.666+02:00",
"source": "#ZfDnuiXDQkY8iIkt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:34.897 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:35.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:37.996+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:37.996+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:35.522 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:36.124 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:36.124 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nAqA8RY0OEPuhHdj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20463/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20463/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:36.124 [print] {
"resourceType": "Location",
"id": "20463",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:39.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:36.124 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:36.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:36.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nAqA8RY0OEPuhHdj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20463/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20463/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:36.126 [print] {
"resourceType": "Location",
"id": "20463",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:39.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:36.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:36.723 [print] {
"resourceType": "Location",
"id": "20463",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:39.269+02:00",
"source": "#nAqA8RY0OEPuhHdj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:37.357 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:37.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:40.508+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:40.508+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:37.987 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:38.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:38.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mtVP6C8VolgpmRM3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20464/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20464/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:38.623 [print] {
"resourceType": "Location",
"id": "20464",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:41.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:38.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:38.624 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:38.624 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mtVP6C8VolgpmRM3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20464/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20464/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:38.624 [print] {
"resourceType": "Location",
"id": "20464",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:41.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:38.624 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:39.228 [print] {
"resourceType": "Location",
"id": "20464",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:41.768+02:00",
"source": "#mtVP6C8VolgpmRM3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:39.857 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:40.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:43.009+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:43.009+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:40.489 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:41.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:41.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BxeqgNd0aB9f7ZVI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20465/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20465/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:41.134 [print] {
"resourceType": "Location",
"id": "20465",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:44.279+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:41.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:41.135 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:41.135 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BxeqgNd0aB9f7ZVI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20465/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20465/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:41.135 [print] {
"resourceType": "Location",
"id": "20465",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:44.279+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:41.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:41.739 [print] {
"resourceType": "Location",
"id": "20465",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:44.279+02:00",
"source": "#BxeqgNd0aB9f7ZVI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:42.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:42.972 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:45.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:45.513+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:42.973 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:43.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:43.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHxdue2EKnViV4fi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20466/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20466/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:43.606 [print] {
"resourceType": "Location",
"id": "20466",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:46.749+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:43.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:43.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:43.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHxdue2EKnViV4fi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20466/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20466/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:43.608 [print] {
"resourceType": "Location",
"id": "20466",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:46.749+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:43.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:44.426 [print] {
"resourceType": "Location",
"id": "20466",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:46.749+02:00",
"source": "#VHxdue2EKnViV4fi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:45.058 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:45.983 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:48.200+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:48.200+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:45.985 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:46.625 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:46.625 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rQnsP4tlYPKYd0dg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20467/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20467/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:46.625 [print] {
"resourceType": "Location",
"id": "20467",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:49.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:46.625 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:46.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:46.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rQnsP4tlYPKYd0dg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20467/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20467/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:46.626 [print] {
"resourceType": "Location",
"id": "20467",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:49.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:46.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:47.217 [print] {
"resourceType": "Location",
"id": "20467",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:49.770+02:00",
"source": "#rQnsP4tlYPKYd0dg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:47.829 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:48.722 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:50.980+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:50.980+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:48.723 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:50.379 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:50.379 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bXxIrrLvygcRMeIj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20468/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20468/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:50.379 [print] {
"resourceType": "Location",
"id": "20468",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:53.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:50.379 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:50.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:50.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bXxIrrLvygcRMeIj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20468/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20468/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:50.381 [print] {
"resourceType": "Location",
"id": "20468",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:53.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:50.381 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:51.012 [print] {
"resourceType": "Location",
"id": "20468",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:53.515+02:00",
"source": "#bXxIrrLvygcRMeIj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:51.616 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:52.220 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:54.766+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:54.766+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:52.222 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:52.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:52.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBpEfNlxTT77o1x5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20469/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20469/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:52.831 [print] {
"resourceType": "Location",
"id": "20469",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:55.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:52.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:52.833 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:52.833 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBpEfNlxTT77o1x5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20469/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20469/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:52.833 [print] {
"resourceType": "Location",
"id": "20469",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:55.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:52.833 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:53.457 [print] {
"resourceType": "Location",
"id": "20469",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:55.975+02:00",
"source": "#tBpEfNlxTT77o1x5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:54.097 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:54.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:57.246+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:57.246+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:54.755 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:55.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:55.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FaoNOLVm4q4WfbF7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20470/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20470/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:55.372 [print] {
"resourceType": "Location",
"id": "20470",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:58.504+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:09:55.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:55.374 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:55.374 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FaoNOLVm4q4WfbF7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20470/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:09:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20470/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:09:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:55.374 [print] {
"resourceType": "Location",
"id": "20470",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:58.504+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:09:55.374 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:56.018 [print] {
"resourceType": "Location",
"id": "20470",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:09:58.504+02:00",
"source": "#FaoNOLVm4q4WfbF7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:56.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:57.244 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:09:59.771+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:09:59.771+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:57.245 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:57.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:57.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yUqMn41lCzVxFXm2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20471/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20471/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:57.900 [print] {
"resourceType": "Location",
"id": "20471",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:01.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:57.900 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:09:57.901 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:09:57.901 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yUqMn41lCzVxFXm2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20471/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20471/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:09:57.901 [print] {
"resourceType": "Location",
"id": "20471",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:01.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:09:57.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:09:58.514 [print] {
"resourceType": "Location",
"id": "20471",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:01.034+02:00",
"source": "#yUqMn41lCzVxFXm2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:09:59.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:09:59.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:02.329+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:02.329+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:09:59.878 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:00.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:00.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sNJNCpFMmWRSHRUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20472/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20472/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:00.492 [print] {
"resourceType": "Location",
"id": "20472",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:03.641+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:00.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:00.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:00.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sNJNCpFMmWRSHRUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20472/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20472/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:00.493 [print] {
"resourceType": "Location",
"id": "20472",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:03.641+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:00.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:01.124 [print] {
"resourceType": "Location",
"id": "20472",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:03.641+02:00",
"source": "#sNJNCpFMmWRSHRUR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:01.742 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:02.609 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:04.894+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:04.894+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:02.611 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:03.252 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:03.252 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OgUuM8xpoa69u9E7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20473/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20473/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:03.252 [print] {
"resourceType": "Location",
"id": "20473",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:06.393+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:03.252 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:03.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:03.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OgUuM8xpoa69u9E7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20473/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20473/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:03.254 [print] {
"resourceType": "Location",
"id": "20473",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:06.393+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:03.254 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:03.875 [print] {
"resourceType": "Location",
"id": "20473",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:06.393+02:00",
"source": "#OgUuM8xpoa69u9E7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:04.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:05.502 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:07.724+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:07.724+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:05.504 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:06.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:06.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yn9XHrhx3pWvRFku"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20474/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20474/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:06.328 [print] {
"resourceType": "Location",
"id": "20474",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:09.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:06.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:06.329 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:06.329 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Yn9XHrhx3pWvRFku"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20474/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20474/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:06.329 [print] {
"resourceType": "Location",
"id": "20474",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:09.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:06.329 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:06.931 [print] {
"resourceType": "Location",
"id": "20474",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:09.474+02:00",
"source": "#Yn9XHrhx3pWvRFku",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:07.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:08.192 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:10.691+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:10.691+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:08.193 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:09.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:09.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LgjrlxkqvX2wAHek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20475/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20475/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:09.255 [print] {
"resourceType": "Location",
"id": "20475",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:12.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:09.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:09.256 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:09.256 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LgjrlxkqvX2wAHek"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20475/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20475/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:09.256 [print] {
"resourceType": "Location",
"id": "20475",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:12.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:09.256 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:09.878 [print] {
"resourceType": "Location",
"id": "20475",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:12.391+02:00",
"source": "#LgjrlxkqvX2wAHek",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:10.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:11.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:13.687+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:13.687+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:11.164 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:11.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:11.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nai22Q8YrokV9ueR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20476/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20476/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:11.766 [print] {
"resourceType": "Location",
"id": "20476",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:14.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:11.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:11.767 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:11.767 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nai22Q8YrokV9ueR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20476/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20476/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:11.767 [print] {
"resourceType": "Location",
"id": "20476",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:14.907+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:11.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:12.375 [print] {
"resourceType": "Location",
"id": "20476",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:14.907+02:00",
"source": "#Nai22Q8YrokV9ueR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:13.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:13.719 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:16.158+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:16.158+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:13.721 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:14.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:14.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7NYJo6lK9wWMUjj6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20477/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20477/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:14.361 [print] {
"resourceType": "Location",
"id": "20477",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:17.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:14.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:14.362 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:14.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7NYJo6lK9wWMUjj6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20477/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20477/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:14.362 [print] {
"resourceType": "Location",
"id": "20477",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:17.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:14.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:14.968 [print] {
"resourceType": "Location",
"id": "20477",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:17.508+02:00",
"source": "#7NYJo6lK9wWMUjj6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:15.592 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:16.192 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:18.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:18.740+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:16.194 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:16.813 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:16.813 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1vCMSKubJDT8UqVy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20478/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20478/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:16.813 [print] {
"resourceType": "Location",
"id": "20478",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:19.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:16.813 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:16.814 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:16.814 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1vCMSKubJDT8UqVy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20478/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20478/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:16.814 [print] {
"resourceType": "Location",
"id": "20478",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:19.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:16.814 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:17.432 [print] {
"resourceType": "Location",
"id": "20478",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:19.958+02:00",
"source": "#1vCMSKubJDT8UqVy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:18.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:18.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:21.197+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:21.197+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:18.648 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:19.345 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:19.345 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C6ddWOHlVQ16PJZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20479/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20479/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:19.345 [print] {
"resourceType": "Location",
"id": "20479",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:22.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:19.345 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:19.347 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:19.347 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C6ddWOHlVQ16PJZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20479/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20479/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:19.347 [print] {
"resourceType": "Location",
"id": "20479",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:22.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:19.347 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:19.944 [print] {
"resourceType": "Location",
"id": "20479",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:22.494+02:00",
"source": "#C6ddWOHlVQ16PJZI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:20.586 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:21.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:23.727+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:23.727+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:21.205 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:21.846 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:21.846 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tF86Ogw4bGa2nGRe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20480/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20480/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:21.846 [print] {
"resourceType": "Location",
"id": "20480",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:24.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:21.846 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:21.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:21.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tF86Ogw4bGa2nGRe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20480/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20480/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:21.847 [print] {
"resourceType": "Location",
"id": "20480",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:24.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:21.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:22.511 [print] {
"resourceType": "Location",
"id": "20480",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:24.997+02:00",
"source": "#tF86Ogw4bGa2nGRe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:23.152 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:23.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:26.302+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:26.302+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:23.765 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:25.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:25.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"09dC2qIUh2yIxXiu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20481/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20481/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:25.381 [print] {
"resourceType": "Location",
"id": "20481",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:28.514+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:25.381 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:25.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:25.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"09dC2qIUh2yIxXiu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20481/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20481/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:25.382 [print] {
"resourceType": "Location",
"id": "20481",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:28.514+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:25.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:25.972 [print] {
"resourceType": "Location",
"id": "20481",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:28.514+02:00",
"source": "#09dC2qIUh2yIxXiu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:26.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:27.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:29.748+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:29.748+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:27.229 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:27.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"339"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:27.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rWbdBBuTpMPgGX7V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20482/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20482/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:27.839 [print] {
"resourceType": "Location",
"id": "20482",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:30.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
> *
print COOKIES
11:10:27.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:27.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"339"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:27.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rWbdBBuTpMPgGX7V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20482/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20482/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:27.840 [print] {
"resourceType": "Location",
"id": "20482",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:30.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
> *
print COOKIES
11:10:27.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:28.445 [print] {
"resourceType": "Location",
"id": "20482",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:30.986+02:00",
"source": "#rWbdBBuTpMPgGX7V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CENTRE INTEGRAL DE SERVEIS EN SALUT MENTAL COMUNITARIA",
"address": {
"city": "BARCELONA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:29.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:29.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:32.264+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:32.264+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:29.736 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:30.392 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:30.392 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgd3aWXrCN1ape1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20483/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20483/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:30.392 [print] {
"resourceType": "Location",
"id": "20483",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:33.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:30.392 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:30.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:30.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgd3aWXrCN1ape1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20483/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20483/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:30.394 [print] {
"resourceType": "Location",
"id": "20483",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:33.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:30.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:31.191 [print] {
"resourceType": "Location",
"id": "20483",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:33.517+02:00",
"source": "#lgd3aWXrCN1ape1G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:31.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:32.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:34.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:34.945+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:32.496 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:33.178 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:33.178 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l6m1RMqWDDhqIZdz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20484/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20484/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:33.178 [print] {
"resourceType": "Location",
"id": "20484",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:36.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:33.178 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:33.180 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:33.180 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l6m1RMqWDDhqIZdz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20484/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20484/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:33.180 [print] {
"resourceType": "Location",
"id": "20484",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:36.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:33.180 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:33.833 [print] {
"resourceType": "Location",
"id": "20484",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:36.315+02:00",
"source": "#l6m1RMqWDDhqIZdz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:34.458 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:35.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:37.608+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:37.608+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:35.357 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:35.979 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:35.979 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lJ9hcDE0HdFjNipI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20485/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20485/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:35.979 [print] {
"resourceType": "Location",
"id": "20485",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:39.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:35.979 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:35.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:35.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lJ9hcDE0HdFjNipI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20485/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20485/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:35.981 [print] {
"resourceType": "Location",
"id": "20485",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:39.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:35.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:36.562 [print] {
"resourceType": "Location",
"id": "20485",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:39.129+02:00",
"source": "#lJ9hcDE0HdFjNipI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:37.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:37.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:40.327+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:40.327+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:37.930 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:38.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:38.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJkgLc7mXR1SUHg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20486/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20486/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:38.904 [print] {
"resourceType": "Location",
"id": "20486",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:42.025+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:38.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:38.906 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:38.906 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJkgLc7mXR1SUHg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20486/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20486/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:38.906 [print] {
"resourceType": "Location",
"id": "20486",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:42.025+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:38.906 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:39.538 [print] {
"resourceType": "Location",
"id": "20486",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:42.025+02:00",
"source": "#KJkgLc7mXR1SUHg1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:40.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:40.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:43.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:43.299+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:40.797 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:41.399 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:41.399 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LqhhyghACd1AWUN9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20487/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20487/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:41.399 [print] {
"resourceType": "Location",
"id": "20487",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:44.547+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:41.399 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:41.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:41.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LqhhyghACd1AWUN9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20487/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20487/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:41.401 [print] {
"resourceType": "Location",
"id": "20487",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:44.547+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:41.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:42.029 [print] {
"resourceType": "Location",
"id": "20487",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:44.547+02:00",
"source": "#LqhhyghACd1AWUN9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:42.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:43.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:45.807+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:45.807+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:43.565 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:44.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:44.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BQbAvltHQi0QSQuL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20488/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20488/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:44.226 [print] {
"resourceType": "Location",
"id": "20488",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:47.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:44.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:44.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:44.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BQbAvltHQi0QSQuL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20488/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20488/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:44.227 [print] {
"resourceType": "Location",
"id": "20488",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:47.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:44.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:44.831 [print] {
"resourceType": "Location",
"id": "20488",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:47.375+02:00",
"source": "#BQbAvltHQi0QSQuL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:45.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:46.097 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:48.612+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:48.612+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:46.099 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:46.716 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"315"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:46.716 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bZSxN1TjVvwZUuxT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20489/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20489/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:46.716 [print] {
"resourceType": "Location",
"id": "20489",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:49.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:10:46.716 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:46.718 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"315"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:46.718 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bZSxN1TjVvwZUuxT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20489/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20489/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:46.718 [print] {
"resourceType": "Location",
"id": "20489",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:49.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:10:46.718 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:47.342 [print] {
"resourceType": "Location",
"id": "20489",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:49.851+02:00",
"source": "#bZSxN1TjVvwZUuxT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:47.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:48.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:51.110+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:51.110+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:48.576 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:49.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"329"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:49.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C3Zsg19oq9cvU0Rd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20490/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20490/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:49.181 [print] {
"resourceType": "Location",
"id": "20490",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:52.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:10:49.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:49.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"329"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:49.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C3Zsg19oq9cvU0Rd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20490/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20490/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:49.182 [print] {
"resourceType": "Location",
"id": "20490",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:52.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:10:49.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:49.772 [print] {
"resourceType": "Location",
"id": "20490",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:52.332+02:00",
"source": "#C3Zsg19oq9cvU0Rd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DE CASTELLON",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:50.390 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:51.002 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:53.540+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:53.540+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:51.003 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:51.622 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:51.622 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iku5Tn9eaXYxIkn0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20491/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20491/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:51.622 [print] {
"resourceType": "Location",
"id": "20491",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:54.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:51.622 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:51.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:51.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iku5Tn9eaXYxIkn0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20491/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20491/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:51.623 [print] {
"resourceType": "Location",
"id": "20491",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:54.768+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:51.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:52.553 [print] {
"resourceType": "Location",
"id": "20491",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:54.768+02:00",
"source": "#iku5Tn9eaXYxIkn0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:53.238 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:53.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:56.389+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:56.389+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:53.875 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:54.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:54.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NUZrqn4E0PanufSj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20492/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20492/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:54.498 [print] {
"resourceType": "Location",
"id": "20492",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:57.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:54.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:54.500 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:54.500 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NUZrqn4E0PanufSj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20492/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:10:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20492/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:10:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:54.500 [print] {
"resourceType": "Location",
"id": "20492",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:57.644+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:54.500 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:55.087 [print] {
"resourceType": "Location",
"id": "20492",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:10:57.644+02:00",
"source": "#NUZrqn4E0PanufSj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:55.696 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:56.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:10:58.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:10:58.844+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:56.322 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:57.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:57.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fdQoj9JQ6a1gvWj3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20493/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20493/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:57.121 [print] {
"resourceType": "Location",
"id": "20493",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:00.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:57.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:57.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:57.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fdQoj9JQ6a1gvWj3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20493/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20493/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:57.123 [print] {
"resourceType": "Location",
"id": "20493",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:00.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:10:57.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:10:57.736 [print] {
"resourceType": "Location",
"id": "20493",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:00.269+02:00",
"source": "#fdQoj9JQ6a1gvWj3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:10:58.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:10:58.991 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:01.505+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:01.505+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:10:58.991 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:59.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"309"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:59.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1MxIqmGiD73Igmrj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20494/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20494/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:59.603 [print] {
"resourceType": "Location",
"id": "20494",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:02.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:10:59.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:10:59.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"309"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:10:59.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1MxIqmGiD73Igmrj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20494/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20494/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:10:59.604 [print] {
"resourceType": "Location",
"id": "20494",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:02.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:10:59.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:00.236 [print] {
"resourceType": "Location",
"id": "20494",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:02.751+02:00",
"source": "#1MxIqmGiD73Igmrj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:00.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:01.445 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:03.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:03.991+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:01.447 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:02.090 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:02.090 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OuhJSxQkDcZFmUxm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20495/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20495/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:02.090 [print] {
"resourceType": "Location",
"id": "20495",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:05.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:02.090 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:02.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:02.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OuhJSxQkDcZFmUxm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20495/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20495/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:02.092 [print] {
"resourceType": "Location",
"id": "20495",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:05.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:02.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:02.684 [print] {
"resourceType": "Location",
"id": "20495",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:05.229+02:00",
"source": "#OuhJSxQkDcZFmUxm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:03.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:04.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:06.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:06.456+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:04.029 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:04.716 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"314"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:04.716 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F09VlYnvxFFCeaC0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20496/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20496/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:04.716 [print] {
"resourceType": "Location",
"id": "20496",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:07.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:11:04.716 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:04.718 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"314"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:04.718 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F09VlYnvxFFCeaC0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20496/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20496/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:04.718 [print] {
"resourceType": "Location",
"id": "20496",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:07.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:11:04.718 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:05.341 [print] {
"resourceType": "Location",
"id": "20496",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:07.867+02:00",
"source": "#F09VlYnvxFFCeaC0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:05.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:06.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:09.099+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:09.099+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:06.566 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:07.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:07.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JNlSYwP3TSyMXQmm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20497/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20497/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:07.193 [print] {
"resourceType": "Location",
"id": "20497",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:10.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:07.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:07.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:07.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JNlSYwP3TSyMXQmm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20497/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20497/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:07.194 [print] {
"resourceType": "Location",
"id": "20497",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:10.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:07.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:07.808 [print] {
"resourceType": "Location",
"id": "20497",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:10.337+02:00",
"source": "#JNlSYwP3TSyMXQmm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:08.441 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:09.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:11.581+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:11.581+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:09.092 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:09.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:09.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aMrN7a6VwuLr3sbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20498/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20498/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:09.720 [print] {
"resourceType": "Location",
"id": "20498",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:12.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:09.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:09.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:09.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aMrN7a6VwuLr3sbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20498/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20498/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:09.722 [print] {
"resourceType": "Location",
"id": "20498",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:12.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:09.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:10.358 [print] {
"resourceType": "Location",
"id": "20498",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:12.856+02:00",
"source": "#aMrN7a6VwuLr3sbr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:10.976 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:11.581 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:14.128+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:14.128+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:11.582 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:12.577 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:12.577 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6qswMiBgnXWaaM9G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20499/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20499/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:12.577 [print] {
"resourceType": "Location",
"id": "20499",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:15.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:12.577 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:12.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:12.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6qswMiBgnXWaaM9G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20499/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20499/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:12.578 [print] {
"resourceType": "Location",
"id": "20499",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:15.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:12.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:13.173 [print] {
"resourceType": "Location",
"id": "20499",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:15.724+02:00",
"source": "#6qswMiBgnXWaaM9G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:13.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:14.404 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:16.946+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:16.946+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:14.406 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:15.027 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:15.027 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eVA26GjMWu6UzYEN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20500/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20500/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:15.027 [print] {
"resourceType": "Location",
"id": "20500",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:18.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:15.027 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:15.029 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:15.029 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eVA26GjMWu6UzYEN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20500/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20500/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:15.029 [print] {
"resourceType": "Location",
"id": "20500",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:18.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:15.029 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:15.897 [print] {
"resourceType": "Location",
"id": "20500",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:18.177+02:00",
"source": "#eVA26GjMWu6UzYEN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:16.517 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:17.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:19.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:19.664+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:17.119 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:17.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:17.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nVsNkexhAfbyg4gz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20501/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20501/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:17.732 [print] {
"resourceType": "Location",
"id": "20501",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:20.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:17.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:17.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:17.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nVsNkexhAfbyg4gz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20501/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20501/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:17.734 [print] {
"resourceType": "Location",
"id": "20501",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:20.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:17.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:18.346 [print] {
"resourceType": "Location",
"id": "20501",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:20.873+02:00",
"source": "#nVsNkexhAfbyg4gz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:18.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:19.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:22.127+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:22.127+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:19.586 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:20.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:20.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6VeLlWLmSni6xSQm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20502/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20502/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:20.220 [print] {
"resourceType": "Location",
"id": "20502",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:23.367+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:20.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:20.222 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:20.222 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6VeLlWLmSni6xSQm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20502/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20502/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:20.223 [print] {
"resourceType": "Location",
"id": "20502",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:23.367+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:20.223 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:20.946 [print] {
"resourceType": "Location",
"id": "20502",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:23.367+02:00",
"source": "#6VeLlWLmSni6xSQm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:21.560 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:22.180 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:24.711+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:24.711+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:22.181 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:22.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:22.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z0uoYzqGuidV0XeW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20503/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20503/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:22.794 [print] {
"resourceType": "Location",
"id": "20503",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:25.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:22.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:22.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:22.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z0uoYzqGuidV0XeW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20503/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20503/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:22.796 [print] {
"resourceType": "Location",
"id": "20503",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:25.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:22.796 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:23.408 [print] {
"resourceType": "Location",
"id": "20503",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:25.930+02:00",
"source": "#Z0uoYzqGuidV0XeW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:24.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:24.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:27.185+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:27.185+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:24.652 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:25.253 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:25.253 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"10ac7M0SHW6lacSj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20504/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20504/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:25.253 [print] {
"resourceType": "Location",
"id": "20504",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:28.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:25.253 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:25.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:25.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"10ac7M0SHW6lacSj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20504/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20504/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:25.255 [print] {
"resourceType": "Location",
"id": "20504",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:28.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:25.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:25.892 [print] {
"resourceType": "Location",
"id": "20504",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:28.399+02:00",
"source": "#10ac7M0SHW6lacSj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:26.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:27.116 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:29.652+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:29.652+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:27.118 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:27.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:27.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LiUZmRam839CEhkm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20505/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20505/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:27.732 [print] {
"resourceType": "Location",
"id": "20505",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:30.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:27.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:27.733 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:27.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LiUZmRam839CEhkm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20505/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20505/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:27.733 [print] {
"resourceType": "Location",
"id": "20505",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:30.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:27.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:28.352 [print] {
"resourceType": "Location",
"id": "20505",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:30.881+02:00",
"source": "#LiUZmRam839CEhkm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:28.968 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:29.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:32.121+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:32.121+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:29.579 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:30.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:30.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUOCxvsIiuPcf28S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20506/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20506/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:30.226 [print] {
"resourceType": "Location",
"id": "20506",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:33.363+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:30.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:30.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:30.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUOCxvsIiuPcf28S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20506/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20506/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:30.227 [print] {
"resourceType": "Location",
"id": "20506",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:33.363+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:30.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:30.847 [print] {
"resourceType": "Location",
"id": "20506",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:33.363+02:00",
"source": "#FUOCxvsIiuPcf28S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:31.455 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:32.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:34.608+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:34.608+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:32.055 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:32.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:32.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cdn0DECIIumK67pe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20507/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20507/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:32.665 [print] {
"resourceType": "Location",
"id": "20507",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:35.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:32.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:32.668 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:32.668 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cdn0DECIIumK67pe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20507/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20507/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:32.668 [print] {
"resourceType": "Location",
"id": "20507",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:35.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:32.668 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:33.272 [print] {
"resourceType": "Location",
"id": "20507",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:35.816+02:00",
"source": "#Cdn0DECIIumK67pe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:33.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:34.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:37.047+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:37.047+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:34.508 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:35.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:35.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8Cc8ryhVZaFJjlGY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20508/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20508/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:35.099 [print] {
"resourceType": "Location",
"id": "20508",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:38.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:35.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:35.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:35.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8Cc8ryhVZaFJjlGY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20508/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20508/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:35.100 [print] {
"resourceType": "Location",
"id": "20508",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:38.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:35.100 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:35.729 [print] {
"resourceType": "Location",
"id": "20508",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:38.246+02:00",
"source": "#8Cc8ryhVZaFJjlGY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:36.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:36.956 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:39.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:39.492+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:36.958 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:37.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:37.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1GEOuUJP2LTIJD4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20509/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20509/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:37.564 [print] {
"resourceType": "Location",
"id": "20509",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:40.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:37.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:37.566 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:37.566 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1GEOuUJP2LTIJD4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20509/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20509/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:37.566 [print] {
"resourceType": "Location",
"id": "20509",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:40.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:37.566 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:38.369 [print] {
"resourceType": "Location",
"id": "20509",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:40.712+02:00",
"source": "#1GEOuUJP2LTIJD4w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:38.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:39.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:42.127+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:42.127+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:39.601 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:40.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:40.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcf9hJuUQQY9vnq4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20510/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20510/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:40.203 [print] {
"resourceType": "Location",
"id": "20510",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:43.353+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:40.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:40.205 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:40.205 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jcf9hJuUQQY9vnq4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20510/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20510/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:40.205 [print] {
"resourceType": "Location",
"id": "20510",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:43.353+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:40.205 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:40.793 [print] {
"resourceType": "Location",
"id": "20510",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:43.353+02:00",
"source": "#jcf9hJuUQQY9vnq4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:41.404 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:41.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:44.549+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:44.549+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:41.999 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:42.599 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:42.599 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3pPqMo1H4HJpVYgs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20511/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20511/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:42.599 [print] {
"resourceType": "Location",
"id": "20511",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:45.748+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:42.599 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:42.601 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:42.601 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3pPqMo1H4HJpVYgs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20511/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20511/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:42.601 [print] {
"resourceType": "Location",
"id": "20511",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:45.748+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:42.601 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:43.205 [print] {
"resourceType": "Location",
"id": "20511",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:45.748+02:00",
"source": "#3pPqMo1H4HJpVYgs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:43.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:44.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:46.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:46.964+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:44.448 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:45.061 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:45.061 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v0Zi7Jlt0Sg8POLD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20512/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20512/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:45.061 [print] {
"resourceType": "Location",
"id": "20512",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:48.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:45.061 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:45.062 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:45.062 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v0Zi7Jlt0Sg8POLD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20512/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20512/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:45.062 [print] {
"resourceType": "Location",
"id": "20512",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:48.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:45.062 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:45.665 [print] {
"resourceType": "Location",
"id": "20512",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:48.205+02:00",
"source": "#v0Zi7Jlt0Sg8POLD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:46.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:46.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:49.437+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:49.437+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:46.885 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:47.500 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:47.500 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m3HJJ2ruFcnR9O1W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20513/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20513/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:47.500 [print] {
"resourceType": "Location",
"id": "20513",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:50.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:47.500 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:47.502 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:47.502 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m3HJJ2ruFcnR9O1W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20513/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20513/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:47.502 [print] {
"resourceType": "Location",
"id": "20513",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:50.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:47.502 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:48.101 [print] {
"resourceType": "Location",
"id": "20513",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:50.650+02:00",
"source": "#m3HJJ2ruFcnR9O1W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:48.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:49.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:51.864+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:51.864+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:49.668 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:50.317 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:50.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"09Vny4WpGg0qR0Bs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20514/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20514/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:50.317 [print] {
"resourceType": "Location",
"id": "20514",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:53.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:50.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:50.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:50.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"09Vny4WpGg0qR0Bs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20514/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20514/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:50.319 [print] {
"resourceType": "Location",
"id": "20514",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:53.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:50.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:50.941 [print] {
"resourceType": "Location",
"id": "20514",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:53.456+02:00",
"source": "#09Vny4WpGg0qR0Bs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:51.557 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:52.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:54.709+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:54.709+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:52.175 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:52.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:52.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NE0cABWH11LHtzd7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20515/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20515/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:52.788 [print] {
"resourceType": "Location",
"id": "20515",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:55.934+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:52.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:52.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:52.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NE0cABWH11LHtzd7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20515/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20515/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:52.791 [print] {
"resourceType": "Location",
"id": "20515",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:55.934+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:52.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:53.448 [print] {
"resourceType": "Location",
"id": "20515",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:55.934+02:00",
"source": "#NE0cABWH11LHtzd7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:54.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:54.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:57.237+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:57.237+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:54.713 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:55.326 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:55.327 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dig1sdapP5FxQrHg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20516/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20516/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:55.327 [print] {
"resourceType": "Location",
"id": "20516",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:58.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:55.327 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:55.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:55.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dig1sdapP5FxQrHg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20516/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:11:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20516/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:11:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:55.328 [print] {
"resourceType": "Location",
"id": "20516",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:58.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:55.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:55.966 [print] {
"resourceType": "Location",
"id": "20516",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:11:58.466+02:00",
"source": "#Dig1sdapP5FxQrHg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:56.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:57.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:11:59.765+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:11:59.765+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:57.258 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:57.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:57.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qnlceE0RlW9yH7BT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20517/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20517/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:57.882 [print] {
"resourceType": "Location",
"id": "20517",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:01.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:57.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:11:57.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:11:57.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qnlceE0RlW9yH7BT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20517/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20517/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:11:57.884 [print] {
"resourceType": "Location",
"id": "20517",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:01.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:11:57.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:11:58.569 [print] {
"resourceType": "Location",
"id": "20517",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:01.024+02:00",
"source": "#qnlceE0RlW9yH7BT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:11:59.255 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:11:59.897 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:02.381+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:02.381+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:11:59.899 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:00.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:00.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vgKBFtCakSSkvRas"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20518/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20518/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:00.546 [print] {
"resourceType": "Location",
"id": "20518",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:03.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:00.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:00.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:00.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vgKBFtCakSSkvRas"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20518/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20518/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:00.548 [print] {
"resourceType": "Location",
"id": "20518",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:03.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:00.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:01.173 [print] {
"resourceType": "Location",
"id": "20518",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:03.690+02:00",
"source": "#vgKBFtCakSSkvRas",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:01.818 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:02.434 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:04.969+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:04.969+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:02.436 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:03.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:03.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P8pRg1ZGOi4f7dAc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20519/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20519/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:03.050 [print] {
"resourceType": "Location",
"id": "20519",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:06.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:03.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:03.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:03.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P8pRg1ZGOi4f7dAc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20519/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20519/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:03.051 [print] {
"resourceType": "Location",
"id": "20519",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:06.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:03.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:03.650 [print] {
"resourceType": "Location",
"id": "20519",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:06.193+02:00",
"source": "#P8pRg1ZGOi4f7dAc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:04.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:04.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:07.411+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:07.411+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:04.901 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:05.567 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:05.567 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WOaRFZfh7RilQP7S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20520/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20520/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:05.567 [print] {
"resourceType": "Location",
"id": "20520",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:08.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:05.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:05.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:05.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WOaRFZfh7RilQP7S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20520/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20520/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:05.569 [print] {
"resourceType": "Location",
"id": "20520",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:08.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:05.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:06.169 [print] {
"resourceType": "Location",
"id": "20520",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:08.716+02:00",
"source": "#WOaRFZfh7RilQP7S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:06.771 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:07.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:09.924+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:09.924+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:07.375 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:08.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:08.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgtst0Bx7yJYXdVJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20521/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20521/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:08.011 [print] {
"resourceType": "Location",
"id": "20521",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:11.158+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:08.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:08.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:08.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bgtst0Bx7yJYXdVJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20521/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20521/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:08.013 [print] {
"resourceType": "Location",
"id": "20521",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:11.158+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:08.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:08.616 [print] {
"resourceType": "Location",
"id": "20521",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:11.158+02:00",
"source": "#bgtst0Bx7yJYXdVJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:09.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:09.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:12.375+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:12.375+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:09.847 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:10.447 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:10.447 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5qtFX1temgVlCOnm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20522/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20522/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:10.447 [print] {
"resourceType": "Location",
"id": "20522",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:13.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:10.447 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:10.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:10.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5qtFX1temgVlCOnm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20522/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20522/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:10.449 [print] {
"resourceType": "Location",
"id": "20522",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:13.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:10.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:11.076 [print] {
"resourceType": "Location",
"id": "20522",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:13.596+02:00",
"source": "#5qtFX1temgVlCOnm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:11.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:12.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:14.861+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:14.861+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:12.324 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:12.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:12.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"plAnr3OdPnvXf2kp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20523/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20523/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:12.940 [print] {
"resourceType": "Location",
"id": "20523",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:16.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:12.940 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:12.942 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:12.942 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"plAnr3OdPnvXf2kp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20523/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20523/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:12.942 [print] {
"resourceType": "Location",
"id": "20523",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:16.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:12.942 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:13.572 [print] {
"resourceType": "Location",
"id": "20523",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:16.079+02:00",
"source": "#plAnr3OdPnvXf2kp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:14.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:14.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:17.340+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:17.340+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:14.822 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:15.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:15.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vUV6OA8799XBZm9c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20524/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20524/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:15.448 [print] {
"resourceType": "Location",
"id": "20524",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:18.590+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:15.448 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:15.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:15.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vUV6OA8799XBZm9c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20524/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20524/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:15.450 [print] {
"resourceType": "Location",
"id": "20524",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:18.590+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:15.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:16.062 [print] {
"resourceType": "Location",
"id": "20524",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:18.590+02:00",
"source": "#vUV6OA8799XBZm9c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:16.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:17.295 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:19.840+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:19.840+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:17.297 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:17.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:17.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AvQFoOYqGogDP8ux"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20525/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20525/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:17.923 [print] {
"resourceType": "Location",
"id": "20525",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:21.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:17.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:17.924 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:17.925 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AvQFoOYqGogDP8ux"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20525/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20525/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:17.925 [print] {
"resourceType": "Location",
"id": "20525",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:21.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:17.925 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:18.546 [print] {
"resourceType": "Location",
"id": "20525",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:21.066+02:00",
"source": "#AvQFoOYqGogDP8ux",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:19.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:20.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:22.355+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:22.355+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:20.088 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:20.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:20.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"97BpyrU9WM2Rgocb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20526/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20526/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:20.709 [print] {
"resourceType": "Location",
"id": "20526",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:23.857+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:20.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:20.710 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:20.710 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"97BpyrU9WM2Rgocb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20526/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20526/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:20.710 [print] {
"resourceType": "Location",
"id": "20526",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:23.857+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:20.710 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:21.342 [print] {
"resourceType": "Location",
"id": "20526",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:23.857+02:00",
"source": "#97BpyrU9WM2Rgocb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:21.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:22.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:25.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:25.109+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:22.566 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:23.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:23.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2u7UqGfm5zKwqwm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20527/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20527/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:23.193 [print] {
"resourceType": "Location",
"id": "20527",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:26.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:23.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:23.195 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:23.195 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2u7UqGfm5zKwqwm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20527/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20527/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:23.195 [print] {
"resourceType": "Location",
"id": "20527",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:26.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:23.195 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:23.821 [print] {
"resourceType": "Location",
"id": "20527",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:26.329+02:00",
"source": "#F2u7UqGfm5zKwqwm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:24.434 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:25.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:27.582+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:27.582+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:25.450 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:26.080 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:26.080 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RCq0aQU1ux1uBLeD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20528/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20528/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:26.080 [print] {
"resourceType": "Location",
"id": "20528",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:29.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:26.080 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:26.082 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:26.082 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RCq0aQU1ux1uBLeD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20528/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20528/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:26.082 [print] {
"resourceType": "Location",
"id": "20528",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:29.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:26.082 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:26.684 [print] {
"resourceType": "Location",
"id": "20528",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:29.221+02:00",
"source": "#RCq0aQU1ux1uBLeD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:27.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:27.908 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:30.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:30.436+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:27.910 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:28.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:28.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ti1AgoEJfVHL8x1y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20529/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20529/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:28.532 [print] {
"resourceType": "Location",
"id": "20529",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:31.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:28.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:28.534 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:28.535 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ti1AgoEJfVHL8x1y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20529/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20529/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:28.535 [print] {
"resourceType": "Location",
"id": "20529",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:31.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:28.535 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:29.160 [print] {
"resourceType": "Location",
"id": "20529",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:31.672+02:00",
"source": "#ti1AgoEJfVHL8x1y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:29.830 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:30.516 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:32.961+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:32.961+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:30.518 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:31.127 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:31.127 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zp5iwNU5rNenorgc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20530/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20530/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:31.127 [print] {
"resourceType": "Location",
"id": "20530",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:34.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:31.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:31.129 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:31.129 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zp5iwNU5rNenorgc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20530/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20530/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:31.129 [print] {
"resourceType": "Location",
"id": "20530",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:34.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:31.129 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:31.746 [print] {
"resourceType": "Location",
"id": "20530",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:34.278+02:00",
"source": "#zp5iwNU5rNenorgc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:32.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:33.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:35.499+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:35.499+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:33.009 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:34.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:34.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jwWFVgz3CIzlNlV5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20531/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20531/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:34.649 [print] {
"resourceType": "Location",
"id": "20531",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:37.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:34.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:34.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:34.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jwWFVgz3CIzlNlV5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20531/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20531/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:34.651 [print] {
"resourceType": "Location",
"id": "20531",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:37.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:34.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:35.252 [print] {
"resourceType": "Location",
"id": "20531",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:37.793+02:00",
"source": "#jwWFVgz3CIzlNlV5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:35.891 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:36.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:39.022+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:39.022+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:36.496 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:37.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"305"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:37.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"06BTjHcvn4XgXky0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20532/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20532/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:37.340 [print] {
"resourceType": "Location",
"id": "20532",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:40.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:37.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:37.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"305"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:37.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"06BTjHcvn4XgXky0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20532/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20532/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:37.341 [print] {
"resourceType": "Location",
"id": "20532",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:40.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:37.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:38.188 [print] {
"resourceType": "Location",
"id": "20532",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:40.476+02:00",
"source": "#06BTjHcvn4XgXky0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL IMED LEVANTE",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:38.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:39.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:41.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:41.972+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:39.428 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:40.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"314"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:40.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Be9Qd3daRDdK4Cqn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20533/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20533/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:40.049 [print] {
"resourceType": "Location",
"id": "20533",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:43.185+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:40.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:40.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"314"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:40.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Be9Qd3daRDdK4Cqn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20533/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20533/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:40.051 [print] {
"resourceType": "Location",
"id": "20533",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:43.185+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:40.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:40.770 [print] {
"resourceType": "Location",
"id": "20533",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:43.185+02:00",
"source": "#Be9Qd3daRDdK4Cqn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "CLINICA VISTAHERMOSA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:41.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:42.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:44.564+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:44.564+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:42.043 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:42.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:42.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuKkzjbAYCL6VBpM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20534/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20534/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:42.650 [print] {
"resourceType": "Location",
"id": "20534",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:45.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:42.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:42.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:42.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuKkzjbAYCL6VBpM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20534/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20534/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:42.651 [print] {
"resourceType": "Location",
"id": "20534",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:45.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:42.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:43.264 [print] {
"resourceType": "Location",
"id": "20534",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:45.796+02:00",
"source": "#kuKkzjbAYCL6VBpM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:43.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:44.537 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:47.025+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:47.025+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:44.538 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:45.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"309"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:45.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vjbr0yhhg4e2HmpN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20535/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20535/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:45.156 [print] {
"resourceType": "Location",
"id": "20535",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:48.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:45.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:45.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"309"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:45.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vjbr0yhhg4e2HmpN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20535/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20535/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:45.157 [print] {
"resourceType": "Location",
"id": "20535",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:48.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:12:45.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:46.164 [print] {
"resourceType": "Location",
"id": "20535",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:48.305+02:00",
"source": "#vjbr0yhhg4e2HmpN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL CLINICA BENIDORM",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:46.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:47.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:49.912+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:49.912+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:47.611 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:48.231 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:48.231 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"olwCzfuyXlryEdEI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20536/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20536/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:48.231 [print] {
"resourceType": "Location",
"id": "20536",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:51.379+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:48.231 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:48.232 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:48.232 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"olwCzfuyXlryEdEI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20536/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20536/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:48.232 [print] {
"resourceType": "Location",
"id": "20536",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:51.379+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:48.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:48.820 [print] {
"resourceType": "Location",
"id": "20536",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:51.379+02:00",
"source": "#olwCzfuyXlryEdEI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:49.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:50.035 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:52.574+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:52.574+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:50.037 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:50.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:50.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"78SI18GQjikIHCzL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20537/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20537/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:50.647 [print] {
"resourceType": "Location",
"id": "20537",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:53.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:50.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:50.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:50.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"78SI18GQjikIHCzL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20537/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20537/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:50.649 [print] {
"resourceType": "Location",
"id": "20537",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:53.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:50.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:51.247 [print] {
"resourceType": "Location",
"id": "20537",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:53.786+02:00",
"source": "#78SI18GQjikIHCzL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:51.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:52.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:55.022+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:55.022+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:52.482 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:53.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:53.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bn7eUOEh7jjJJErx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20538/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20538/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:53.093 [print] {
"resourceType": "Location",
"id": "20538",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:56.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:53.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:53.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:53.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bn7eUOEh7jjJJErx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20538/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20538/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:53.095 [print] {
"resourceType": "Location",
"id": "20538",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:56.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:53.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:53.702 [print] {
"resourceType": "Location",
"id": "20538",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:56.231+02:00",
"source": "#bn7eUOEh7jjJJErx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:54.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:54.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:57.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:57.492+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:54.966 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:55.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:55.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1jQ27FucrCxSEGEs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20539/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20539/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:55.606 [print] {
"resourceType": "Location",
"id": "20539",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:58.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:55.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:55.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:55.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1jQ27FucrCxSEGEs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20539/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:12:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20539/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:12:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:55.608 [print] {
"resourceType": "Location",
"id": "20539",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:58.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:55.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:56.205 [print] {
"resourceType": "Location",
"id": "20539",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:12:58.757+02:00",
"source": "#1jQ27FucrCxSEGEs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:56.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:57.404 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:12:59.955+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:12:59.955+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:57.405 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:58.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:58.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GABof1BcAIl30TYw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20540/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20540/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:58.047 [print] {
"resourceType": "Location",
"id": "20540",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:01.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:58.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:12:58.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:12:58.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GABof1BcAIl30TYw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20540/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20540/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:12:58.050 [print] {
"resourceType": "Location",
"id": "20540",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:01.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:12:58.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:12:58.678 [print] {
"resourceType": "Location",
"id": "20540",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:01.194+02:00",
"source": "#GABof1BcAIl30TYw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:12:59.291 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:12:59.891 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:02.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:02.432+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:12:59.893 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:00.510 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"315"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:00.510 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eOI55V93tTnsVQl6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20541/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20541/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:00.510 [print] {
"resourceType": "Location",
"id": "20541",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:03.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:00.510 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:00.511 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"315"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:00.511 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eOI55V93tTnsVQl6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20541/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20541/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:00.511 [print] {
"resourceType": "Location",
"id": "20541",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:03.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:00.511 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:01.148 [print] {
"resourceType": "Location",
"id": "20541",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:03.658+02:00",
"source": "#eOI55V93tTnsVQl6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL MEDIMAR INTERNACIONAL",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:01.784 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:02.405 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:04.933+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:04.933+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:02.407 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:03.045 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"325"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:03.045 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eW84R4aWtwvm0O4Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20542/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20542/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:03.045 [print] {
"resourceType": "Location",
"id": "20542",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:06.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:03.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:03.046 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"325"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:03.046 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eW84R4aWtwvm0O4Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20542/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20542/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:03.046 [print] {
"resourceType": "Location",
"id": "20542",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:06.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:03.046 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:03.673 [print] {
"resourceType": "Location",
"id": "20542",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:06.194+02:00",
"source": "#eW84R4aWtwvm0O4Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL GENERAL UNIVERSITARIO DR. BALMIS",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:04.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:04.906 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:07.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:07.456+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:04.908 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:05.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:05.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OhkIrhoOSZVeVQGS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20543/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20543/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:05.533 [print] {
"resourceType": "Location",
"id": "20543",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:08.679+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:05.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:05.534 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:05.534 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OhkIrhoOSZVeVQGS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20543/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20543/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:05.534 [print] {
"resourceType": "Location",
"id": "20543",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:08.679+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:05.535 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:06.406 [print] {
"resourceType": "Location",
"id": "20543",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:08.679+02:00",
"source": "#OhkIrhoOSZVeVQGS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:07.012 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:07.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:10.165+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:10.165+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:07.618 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:08.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"333"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:08.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YemOR8ptTVlsoUfe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20544/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20544/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:08.257 [print] {
"resourceType": "Location",
"id": "20544",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:11.409+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:08.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:08.259 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"333"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:08.259 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YemOR8ptTVlsoUfe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20544/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20544/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:08.259 [print] {
"resourceType": "Location",
"id": "20544",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:11.409+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:08.259 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:08.878 [print] {
"resourceType": "Location",
"id": "20544",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:11.409+02:00",
"source": "#YemOR8ptTVlsoUfe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL PSIQUIATRICO PENITENCIARIO DE FONTCALENT",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:09.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:10.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:12.636+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:12.636+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:10.114 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:10.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:10.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"elFlBMV2v307szcc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20545/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20545/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:10.745 [print] {
"resourceType": "Location",
"id": "20545",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:13.876+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:10.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:10.747 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:10.747 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"elFlBMV2v307szcc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20545/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20545/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:10.747 [print] {
"resourceType": "Location",
"id": "20545",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:13.876+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:10.747 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:11.351 [print] {
"resourceType": "Location",
"id": "20545",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:13.876+02:00",
"source": "#elFlBMV2v307szcc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:11.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:12.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:15.110+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:15.110+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:12.555 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:13.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:13.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJYoxNPoQd5qt8ZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20546/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20546/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:13.193 [print] {
"resourceType": "Location",
"id": "20546",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:16.325+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:13.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:13.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:13.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJYoxNPoQd5qt8ZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20546/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20546/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:13.195 [print] {
"resourceType": "Location",
"id": "20546",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:16.325+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:13.195 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:13.798 [print] {
"resourceType": "Location",
"id": "20546",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:16.325+02:00",
"source": "#AJYoxNPoQd5qt8ZI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:14.767 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:15.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:17.918+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:17.918+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:15.372 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:15.984 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:15.984 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P083gixA3pjgehJP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20547/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20547/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:15.984 [print] {
"resourceType": "Location",
"id": "20547",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:19.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:15.984 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:15.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:15.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P083gixA3pjgehJP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20547/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20547/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:15.985 [print] {
"resourceType": "Location",
"id": "20547",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:19.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:15.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:16.583 [print] {
"resourceType": "Location",
"id": "20547",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:19.131+02:00",
"source": "#P083gixA3pjgehJP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:17.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:17.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:20.346+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:20.346+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:17.816 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:19.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:19.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uIAWEUCTxmcthi3n"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20548/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20548/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:19.439 [print] {
"resourceType": "Location",
"id": "20548",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:22.588+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:19.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:19.440 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:19.440 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uIAWEUCTxmcthi3n"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20548/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20548/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:19.440 [print] {
"resourceType": "Location",
"id": "20548",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:22.588+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:19.440 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:20.038 [print] {
"resourceType": "Location",
"id": "20548",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:22.588+02:00",
"source": "#uIAWEUCTxmcthi3n",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:20.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:22.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:23.809+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:23.809+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:22.291 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:22.888 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:22.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4OKduw0hO7V3opab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20549/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20549/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:22.889 [print] {
"resourceType": "Location",
"id": "20549",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:26.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:22.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:22.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"322"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:22.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4OKduw0hO7V3opab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20549/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20549/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:22.890 [print] {
"resourceType": "Location",
"id": "20549",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:26.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
> *
print COOKIES
11:13:22.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:23.503 [print] {
"resourceType": "Location",
"id": "20549",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:26.037+02:00",
"source": "#4OKduw0hO7V3opab",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL SAN CARLOS DE DENIA GRUPO HLA",
"address": {
"city": "ALICANTE",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:24.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:24.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:27.315+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:27.315+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:24.789 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:25.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"311"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:25.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AO431VMlmejUQ658"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20550/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20550/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:25.402 [print] {
"resourceType": "Location",
"id": "20550",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:28.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
> *
print COOKIES
11:13:25.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:25.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"311"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:25.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AO431VMlmejUQ658"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20550/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20550/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:25.404 [print] {
"resourceType": "Location",
"id": "20550",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:28.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
> *
print COOKIES
11:13:25.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:25.992 [print] {
"resourceType": "Location",
"id": "20550",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:28.551+02:00",
"source": "#AO431VMlmejUQ658",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL QUIRONSALUD SAN JOSE",
"address": {
"city": "MADRID",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:26.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:27.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:29.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:29.974+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:27.429 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:28.039 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:28.039 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4eY5z6t9q5hi9BnH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20551/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20551/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:28.039 [print] {
"resourceType": "Location",
"id": "20551",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:31.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:28.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:28.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:28.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4eY5z6t9q5hi9BnH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20551/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20551/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:28.042 [print] {
"resourceType": "Location",
"id": "20551",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:31.182+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:28.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:28.742 [print] {
"resourceType": "Location",
"id": "20551",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:31.182+02:00",
"source": "#4eY5z6t9q5hi9BnH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:29.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:29.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:32.501+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:32.501+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:29.958 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:30.576 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:30.576 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dKEOOLy5lrLgG5On"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20552/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20552/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:30.576 [print] {
"resourceType": "Location",
"id": "20552",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:33.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:30.576 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:30.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:30.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dKEOOLy5lrLgG5On"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20552/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20552/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:30.578 [print] {
"resourceType": "Location",
"id": "20552",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:33.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:30.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:31.172 [print] {
"resourceType": "Location",
"id": "20552",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:33.722+02:00",
"source": "#dKEOOLy5lrLgG5On",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:31.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:32.390 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:34.942+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:34.942+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:32.391 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:33.008 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:33.009 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UwRtdjmpWY8AQ4wC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20553/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20553/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:33.009 [print] {
"resourceType": "Location",
"id": "20553",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:36.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:33.009 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:33.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:33.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UwRtdjmpWY8AQ4wC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20553/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20553/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:33.010 [print] {
"resourceType": "Location",
"id": "20553",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:36.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:33.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:33.595 [print] {
"resourceType": "Location",
"id": "20553",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:36.156+02:00",
"source": "#UwRtdjmpWY8AQ4wC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:34.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:34.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:37.364+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:37.364+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:34.876 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:35.536 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:35.536 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FnfLiu6H1rEBclWB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20554/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20554/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:35.536 [print] {
"resourceType": "Location",
"id": "20554",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:38.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:35.536 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:35.537 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:35.537 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FnfLiu6H1rEBclWB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20554/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20554/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:35.537 [print] {
"resourceType": "Location",
"id": "20554",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:38.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:35.537 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:36.147 [print] {
"resourceType": "Location",
"id": "20554",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:38.680+02:00",
"source": "#FnfLiu6H1rEBclWB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:36.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:37.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:39.902+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:39.902+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:37.376 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:37.972 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:37.972 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gBe4wyoQtQBXR2i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20555/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20555/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:37.972 [print] {
"resourceType": "Location",
"id": "20555",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:41.118+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:37.972 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:37.973 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:37.973 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gBe4wyoQtQBXR2i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20555/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20555/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:37.973 [print] {
"resourceType": "Location",
"id": "20555",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:41.118+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:37.973 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:38.572 [print] {
"resourceType": "Location",
"id": "20555",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:41.118+02:00",
"source": "#4gBe4wyoQtQBXR2i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:39.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:39.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:42.345+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:42.345+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:39.816 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:40.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:40.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KcnmnavdSOOVcvlR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20556/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20556/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:40.427 [print] {
"resourceType": "Location",
"id": "20556",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:43.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:40.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:40.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:40.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KcnmnavdSOOVcvlR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20556/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20556/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:40.429 [print] {
"resourceType": "Location",
"id": "20556",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:43.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:40.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:41.035 [print] {
"resourceType": "Location",
"id": "20556",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:43.572+02:00",
"source": "#KcnmnavdSOOVcvlR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:41.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:42.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:44.807+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:44.807+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:42.265 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:43.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:43.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YxOrIxMgY5pnPf1e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20557/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20557/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:43.068 [print] {
"resourceType": "Location",
"id": "20557",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:46.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:43.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:43.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:43.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YxOrIxMgY5pnPf1e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20557/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20557/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:43.069 [print] {
"resourceType": "Location",
"id": "20557",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:46.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:43.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:43.687 [print] {
"resourceType": "Location",
"id": "20557",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:46.015+02:00",
"source": "#YxOrIxMgY5pnPf1e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:44.304 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:44.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:47.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:47.456+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:44.913 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:45.815 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:45.815 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sVd4ykqf2tFLI5h1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20558/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20558/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:45.815 [print] {
"resourceType": "Location",
"id": "20558",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:48.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:45.815 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:45.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:45.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sVd4ykqf2tFLI5h1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20558/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20558/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:45.816 [print] {
"resourceType": "Location",
"id": "20558",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:48.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:45.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:46.419 [print] {
"resourceType": "Location",
"id": "20558",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:48.962+02:00",
"source": "#sVd4ykqf2tFLI5h1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:47.058 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:47.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:50.206+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:50.206+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:47.675 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:49.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:49.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qd9Ca1L5Xz7dFE5h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20559/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20559/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:49.271 [print] {
"resourceType": "Location",
"id": "20559",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:52.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:49.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:49.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:49.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qd9Ca1L5Xz7dFE5h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20559/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20559/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:49.273 [print] {
"resourceType": "Location",
"id": "20559",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:52.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:49.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:49.876 [print] {
"resourceType": "Location",
"id": "20559",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:52.415+02:00",
"source": "#Qd9Ca1L5Xz7dFE5h",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:50.480 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:51.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:53.632+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:53.632+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:51.080 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:51.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:51.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XcN6fC9hFQsHlty9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20560/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20560/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:51.685 [print] {
"resourceType": "Location",
"id": "20560",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:54.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:51.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:51.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:51.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XcN6fC9hFQsHlty9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20560/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20560/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:51.690 [print] {
"resourceType": "Location",
"id": "20560",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:54.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:51.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:52.292 [print] {
"resourceType": "Location",
"id": "20560",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:54.836+02:00",
"source": "#XcN6fC9hFQsHlty9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:52.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:53.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:56.067+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:56.067+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:53.522 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:54.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:54.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q4MIBNuQvlEqGQQh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20561/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20561/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:54.153 [print] {
"resourceType": "Location",
"id": "20561",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:57.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:54.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:54.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:54.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q4MIBNuQvlEqGQQh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20561/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:13:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20561/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:13:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:54.155 [print] {
"resourceType": "Location",
"id": "20561",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:57.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:54.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:54.788 [print] {
"resourceType": "Location",
"id": "20561",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:13:57.303+02:00",
"source": "#Q4MIBNuQvlEqGQQh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:55.390 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:55.985 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:13:58.541+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:13:58.541+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:55.986 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:56.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:56.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C59OUMQSVSLwPP7P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20562/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20562/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:56.922 [print] {
"resourceType": "Location",
"id": "20562",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:00.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:56.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:56.923 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:56.923 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C59OUMQSVSLwPP7P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20562/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20562/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:56.923 [print] {
"resourceType": "Location",
"id": "20562",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:00.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:56.923 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:13:57.540 [print] {
"resourceType": "Location",
"id": "20562",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:00.071+02:00",
"source": "#C59OUMQSVSLwPP7P",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:13:58.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:13:58.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:01.321+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:01.321+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:13:58.817 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:59.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:59.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uE7Axj5QXAb9ACy6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20563/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20563/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:59.475 [print] {
"resourceType": "Location",
"id": "20563",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:02.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:59.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:13:59.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:13:59.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uE7Axj5QXAb9ACy6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20563/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20563/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:13:59.476 [print] {
"resourceType": "Location",
"id": "20563",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:02.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:13:59.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:00.097 [print] {
"resourceType": "Location",
"id": "20563",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:02.624+02:00",
"source": "#uE7Axj5QXAb9ACy6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:00.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:01.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:03.867+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:03.867+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:01.367 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:01.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:01.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CFsEe8mYkLb7KKAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20564/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20564/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:01.988 [print] {
"resourceType": "Location",
"id": "20564",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:05.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:01.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:01.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:01.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CFsEe8mYkLb7KKAr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20564/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20564/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:01.989 [print] {
"resourceType": "Location",
"id": "20564",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:05.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:01.989 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:02.608 [print] {
"resourceType": "Location",
"id": "20564",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:05.139+02:00",
"source": "#CFsEe8mYkLb7KKAr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:03.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:04.491 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:06.607+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:06.607+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:04.493 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:05.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:05.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eUpHyOTaLdOkiyLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20565/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20565/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:05.122 [print] {
"resourceType": "Location",
"id": "20565",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:08.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:05.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:05.124 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:05.124 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eUpHyOTaLdOkiyLU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20565/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20565/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:05.124 [print] {
"resourceType": "Location",
"id": "20565",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:08.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:05.124 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:05.721 [print] {
"resourceType": "Location",
"id": "20565",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:08.264+02:00",
"source": "#eUpHyOTaLdOkiyLU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:06.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:06.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:09.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:09.513+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:06.989 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:07.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:07.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fn1cuDyhc5ZiUsvl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20566/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20566/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:07.605 [print] {
"resourceType": "Location",
"id": "20566",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:10.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:07.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:07.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:07.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fn1cuDyhc5ZiUsvl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20566/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20566/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:07.606 [print] {
"resourceType": "Location",
"id": "20566",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:10.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:07.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:08.212 [print] {
"resourceType": "Location",
"id": "20566",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:10.756+02:00",
"source": "#fn1cuDyhc5ZiUsvl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:08.842 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:09.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:11.993+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:11.993+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:09.453 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:10.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:10.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a6TJcQFD44tejMyJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20567/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20567/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:10.053 [print] {
"resourceType": "Location",
"id": "20567",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:13.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:10.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:10.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:10.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a6TJcQFD44tejMyJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20567/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20567/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:10.054 [print] {
"resourceType": "Location",
"id": "20567",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:13.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:10.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:10.701 [print] {
"resourceType": "Location",
"id": "20567",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:13.193+02:00",
"source": "#a6TJcQFD44tejMyJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:11.329 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:11.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:14.471+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:14.471+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:11.944 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:12.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:12.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vOFK3SLtyUUP4vUA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20568/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20568/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:12.562 [print] {
"resourceType": "Location",
"id": "20568",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:15.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:12.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:12.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:12.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vOFK3SLtyUUP4vUA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20568/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20568/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:12.564 [print] {
"resourceType": "Location",
"id": "20568",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:15.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:12.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:13.168 [print] {
"resourceType": "Location",
"id": "20568",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:15.690+02:00",
"source": "#vOFK3SLtyUUP4vUA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:13.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:14.431 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:16.967+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:16.967+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:14.432 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:15.077 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:15.077 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O0FRqS4AomDqGiBv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20569/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20569/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:15.077 [print] {
"resourceType": "Location",
"id": "20569",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:18.208+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:15.077 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:15.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:15.079 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O0FRqS4AomDqGiBv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20569/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20569/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:15.079 [print] {
"resourceType": "Location",
"id": "20569",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:18.208+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:15.079 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:15.708 [print] {
"resourceType": "Location",
"id": "20569",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:18.208+02:00",
"source": "#O0FRqS4AomDqGiBv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:16.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:16.976 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:19.505+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:19.505+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:16.978 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:17.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:17.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QjTwc4WkRYmlJZz2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20570/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20570/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:17.608 [print] {
"resourceType": "Location",
"id": "20570",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:20.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:17.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:17.610 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:17.610 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QjTwc4WkRYmlJZz2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20570/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20570/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:17.610 [print] {
"resourceType": "Location",
"id": "20570",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:20.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:17.610 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:18.250 [print] {
"resourceType": "Location",
"id": "20570",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:20.746+02:00",
"source": "#QjTwc4WkRYmlJZz2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:18.884 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:19.491 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:22.030+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:22.030+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:19.492 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:20.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:20.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SnOZr9ms6fQuaCxN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20571/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20571/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:20.104 [print] {
"resourceType": "Location",
"id": "20571",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:23.254+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:20.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:20.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:20.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SnOZr9ms6fQuaCxN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20571/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20571/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:20.106 [print] {
"resourceType": "Location",
"id": "20571",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:23.254+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:20.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:20.717 [print] {
"resourceType": "Location",
"id": "20571",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:23.254+02:00",
"source": "#SnOZr9ms6fQuaCxN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:21.340 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:21.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:24.493+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:24.493+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:21.945 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:22.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:22.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pJ0uIGBaaVFEmfWz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20572/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20572/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:22.563 [print] {
"resourceType": "Location",
"id": "20572",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:25.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:22.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:22.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:22.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pJ0uIGBaaVFEmfWz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20572/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20572/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:22.565 [print] {
"resourceType": "Location",
"id": "20572",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:25.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:22.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:23.227 [print] {
"resourceType": "Location",
"id": "20572",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:25.711+02:00",
"source": "#pJ0uIGBaaVFEmfWz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:23.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:24.462 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:26.990+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:26.990+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:24.463 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:25.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:25.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"svwnzEDIoBS7EIAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20573/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20573/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:25.477 [print] {
"resourceType": "Location",
"id": "20573",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:28.621+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:25.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:25.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:25.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"svwnzEDIoBS7EIAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20573/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20573/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:25.478 [print] {
"resourceType": "Location",
"id": "20573",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:28.621+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:25.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:26.089 [print] {
"resourceType": "Location",
"id": "20573",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:28.621+02:00",
"source": "#svwnzEDIoBS7EIAF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:26.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:28.549 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:29.865+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:29.865+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:28.551 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:29.166 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:29.166 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"47RMZc2Zwcr2KKLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20574/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20574/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:29.166 [print] {
"resourceType": "Location",
"id": "20574",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:32.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:29.166 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:29.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:29.168 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"47RMZc2Zwcr2KKLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20574/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20574/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:29.168 [print] {
"resourceType": "Location",
"id": "20574",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:32.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:29.168 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:30.775 [print] {
"resourceType": "Location",
"id": "20574",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:32.316+02:00",
"source": "#47RMZc2Zwcr2KKLr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:31.409 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:32.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:34.552+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:34.552+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:32.045 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:32.675 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:32.675 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XTAbzRLbqDqfZ4RK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20575/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20575/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:32.675 [print] {
"resourceType": "Location",
"id": "20575",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:35.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:32.675 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:32.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:32.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XTAbzRLbqDqfZ4RK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20575/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20575/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:32.676 [print] {
"resourceType": "Location",
"id": "20575",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:35.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:32.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:33.283 [print] {
"resourceType": "Location",
"id": "20575",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:35.815+02:00",
"source": "#XTAbzRLbqDqfZ4RK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:33.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:34.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:37.047+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:37.047+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:34.796 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:35.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"307"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:35.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MJaoeQj7W9UMlY9f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20576/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20576/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:35.418 [print] {
"resourceType": "Location",
"id": "20576",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:38.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:14:35.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:35.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"307"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:35.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MJaoeQj7W9UMlY9f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20576/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20576/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:35.420 [print] {
"resourceType": "Location",
"id": "20576",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:38.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
> *
print COOKIES
11:14:35.420 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:36.045 [print] {
"resourceType": "Location",
"id": "20576",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:38.565+02:00",
"source": "#MJaoeQj7W9UMlY9f",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL LA MAGDALENA",
"address": {
"city": "CASTELLÓN",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:36.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:38.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:39.796+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:39.796+02:00"
}
]
}
@Delete
@Post
@Get
@Only-api
@Location
Scenario Outline: The hospital sends a FHIR Location resource.
Given
path '/Location'
And
print resource
11:14:38.304 [print] {
"resourceType": "Location",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:38.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:38.938 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9c8AoEpkUjPrKB3H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20577/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20577/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:38.938 [print] {
"resourceType": "Location",
"id": "20577",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:42.076+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:38.939 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:14:38.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"326"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:14:38.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9c8AoEpkUjPrKB3H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20577/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:14:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Location/20577/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:14:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:14:38.940 [print] {
"resourceType": "Location",
"id": "20577",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:42.076+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
> *
print COOKIES
11:14:38.940 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:14:39.542 [print] {
"resourceType": "Location",
"id": "20577",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:14:42.076+02:00",
"source": "#9c8AoEpkUjPrKB3H",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Location-eu-pcsp"
]
},
"language": "ES",
"name": "HOSPITAL UNIVERSITARIO Y POLITECNICO LA FE",
"address": {
"city": "VALENCIA",
"country": "ES"
}
}
When
print 'They try to delete the Location resource from the server'
And
method DELETE
Then
status 200
And
print response
11:14:40.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Location resource is on the server'
And
method GET
Then
status 410
And
print response
11:14:40.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:14:43.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:14:43.299+02:00"
}
]
}